Closed GoogleCodeExporter closed 8 years ago
I have tested it and while I do not have the impression that a character gets
selected without touching it at all, I agree that people attempting to select
"the whole character" place the cursor on its edge or "between the characters"
which makes it likely to actually touch the neighbor and get it selected.
So I would support your proposal that 1 half of pixel width should be covered
to get the character include.
Likewise vertically, line catching sensitivity should be reduced by a few
pixels, especially as the cursor is of quite long height. My proposal here
would be that counting from the cursor center, 1/3 (or 1/4) of the pixel height
should be covered to get the line included. Maybe some fine tuning would be
good (or even an option...?).
Original comment by towom...@googlemail.com
on 25 Nov 2011 at 4:07
Thank you for looking into this!
I mistakenly have added Vista to the Windows versions that have the full
problem. Now that I'm back home I realize that in Vista "untouched characters
are not included", while in W.7 they are (checked on 3 systems). Nonetheless,
even on Vista mouse selection is somewhat problematic (like you described),
which is the reason why I thought that the problem was the same.
Original comment by waltertr...@gmail.com
on 25 Nov 2011 at 11:25
Surprised (a little bit) that behaviour depends on the Windows version, I
should add I tested on Windows XP.
Original comment by towom...@googlemail.com
on 26 Nov 2011 at 2:18
I can reproduce this on Windows 7 too, and not on XP. Haven't tried Vista. So I
had a closer look and found (somewhat incredulously) that it's a problem with
Windows 7's default text selection cursor: it appears two pixels to the right
of where it's supposed to be.
This means that when mintty is told that the mouse is at X coordinate 0, i.e.
the leftmost pixel inside the window frame, the text selection cursor actually
appears a couple of pixels further inside the window. This can be seen when
moving the mouse towards the left window frame, where it changes to the resize
cursor before it even reaches the frame, whereas on the right hand side one can
move the selection cursor a couple of pixels onto the window frame before it
changes.
This doesn't just happen in mintty, but across Windows. For example, it can be
seen when moving the mouse into a Notepad window. Furthermore, when selecting
text in GUI programs, characters aren't actually included when the cursor hits
their centre, but again a couple of pixels to the right of that.
The problem goes away if one chooses a different mouse pointer scheme (e.g.
"Windows Black") or just a different text selection cursor in the Mouse control
panel.
Therefore I'm rejecting this as "Not a mintty issue".
Regarding the touched-it-selected-it approach, the Windows console, PuTTY,
xterm, and rxvt(-unicode) all do that to, so I don't accept that that's a
defect. Do enter an enhancement issue for it though if you feel strongly enough
about it.
Original comment by andy.koppe
on 26 Nov 2011 at 8:23
Agreed: not a mintty issue.
For people who cannot wait for Microsoft to fix the bugs of Windows 7:
mintty can be recompiled changing "x - PADDING" to "x + 2 - PADDING" in
function translate_pos(), file wininput.c
Andy, regarding the touched-it-selected-it approach: gnome-terminal and
konsole, but also Eclipse, NetBeans, Notepad++, even Notepad, all agree with
you in the Y direction only, while in the X direction the character's "center"
is what makes it belong or not to the selection. Furthermore mintty lacks the
immediate feedback for the left edge of the selection (in the typical case of a
drag to the right), since the selection is not shown before it includes 2
characters.
I'm not sure I will enter the enhancement issue, though, since judging from the
source code this would be quite a complex rewrite.
Anyhow: thank you!
Original comment by waltertr...@gmail.com
on 27 Nov 2011 at 3:11
replaced by issue 307
Original comment by waltertr...@gmail.com
on 15 Dec 2011 at 2:23
I've entered issue 308 for converting to the GUI-style selection approach.
Also, in r1244 on the 1.0 branch, I've made it possible to select a single
character without touching a second character first.
Original comment by andy.koppe
on 19 Dec 2011 at 6:27
I reverted r1244 on the 1.0 branch, as it caused unintended selection of single
characters, particularly when clicking into a mintty window to activate it.
I'll try again on trunk.
Original comment by andy.koppe
on 23 Dec 2011 at 6:09
Original issue reported on code.google.com by
waltertr...@gmail.com
on 24 Nov 2011 at 4:44