Last character in visual selection remains unhighlighted
Hi all, It seems that a lot of the time, visual selection for me is visually off by one character. For example, consider the following line, with the cursor at BOL. (123) If I issue commands like "vf)", "v%", I end with the closing paren under the cursor, but the visual mark will NOT include the closing paren, and will only include the first 3 characters, "(123". Now, it is important to note that if I then try to yank the selection, the yanked region is exactly what it should be, i.e. it will include the closing paren. As such, this defect for me is purely cosmetic, but a little annoying. Is this a known issue? Is it possible there is some misconfiguration on my part? Thanks, --Leo
Am 06.02.2014 07:18, schrieb Leo Alekseyev:
Hi all, It seems that a lot of the time, visual selection for me is visually off by one character. For example, consider the following line, with the cursor at BOL.
(123)
If I issue commands like "vf)", "v%", I end with the closing paren under the cursor, but the visual mark will NOT include the closing paren, and will only include the first 3 characters, "(123". Now, it is important to note that if I then try to yank the selection, the yanked region is exactly what it should be, i.e. it will include the closing paren. As such, this defect for me is purely cosmetic, but a little annoying. Is this a known issue?
No.
Is it possible there is some misconfiguration on my part?
Maybe, hard to say. The best you can do is to provide a minimal example to reproduce the problem (e.g. type 'make clean emacs' in Evil's source directory to start a fresh Emacs with nothing loaded but Evil and then some key-sequence to demonstrate the problem). And do not forget to tell us the Emacs version, Evil version, whether you use Evil in X or in terminal and so on. Best regards, Frank
On Thu, Feb 6, 2014 at 11:47 AM, Frank Fischer <[email protected]
wrote:
Am 06.02.2014 07:18, schrieb Leo Alekseyev:
Hi all, It seems that a lot of the time, visual selection for me is visually off by one character. For example, consider the following line, with the cursor at BOL.
(123)
If I issue commands like "vf)", "v%", I end with the closing paren under the cursor, but the visual mark will NOT include the closing paren, and will only include the first 3 characters, "(123". Now, it is important to note that if I then try to yank the selection, the yanked region is exactly what it should be, i.e. it will include the closing paren. As such, this defect for me is purely cosmetic, but a little annoying. Is this a known issue?
No.
Is it possible there is some misconfiguration on my part?
It appears that in my case, the behavior is caused by show-paren-mode. I am guessing that the highlighting of the parentheses takes precedence over the highlighting due to the visual selection, which is a little unfortunate. If anyone is aware of a workaround, or possibly a different paren highlighting mode that doesn't suffer from this problem, please let me know!
This is how Vim works for me, so I wouldn't consider this a bug. I checked GVim, which does work the way you are saying. i.e., In GVim, visual selection highlighting includes the character under the cursor, and in Vim, it does not. I wouldn't consider this a bug, but even if we were to treat it as a bug, even as an aesthetic bug it is *extremely* low priority, I think. Allen On Wed, Feb 05, 2014 at 10:18:44PM -0800, Leo Alekseyev wrote:
Hi all, It seems that a lot of the time, visual selection for me is visually off by one character. For example, consider the following line, with the cursor at BOL.
(123)
If I issue commands like "vf)", "v%", I end with the closing paren under the cursor, but the visual mark will NOT include the closing paren, and will only include the first 3 characters, "(123". Now, it is important to note that if I then try to yank the selection, the yanked region is exactly what it should be, i.e. it will include the closing paren. As such, this defect for me is purely cosmetic, but a little annoying. Is this a known issue? Is it possible there is some misconfiguration on my part?
Thanks,
--Leo
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Leo Alekseyev <[email protected]> writes:
Hi all, It seems that a lot of the time, visual selection for me is visually off by one character. For example, consider the following line, with the cursor at BOL.
(123)
If I issue commands like "vf)", "v%", I end with the closing paren under the cursor, but the visual mark will NOT include the closing paren, and will only include the first 3 characters, "(123". Now, it is important to note that if I then try to yank the selection, the yanked region is exactly what it should be, i.e. it will include the closing paren. As such, this defect for me is purely cosmetic, but a little annoying. Is this a known issue? Is it possible there is some misconfiguration on my part?
In my case, the highlighted region is like yours, i.e. no closing paren, but the yanked contents are exactly what is highlighted, i.e. no closing paren, so the behaviour is at least self-consistent. I would probably prefer that the closing paren be included but I'm not too bothered. It's been a very long time since I used vi (i.e. before vim existed ;-) so I have no idea what is expected behaviour. -- : Eric S Fraga, GnuPG: 0xFFFCF67D : in Emacs 24.3.1 + Ma Gnus v0.10 + evil 1.0-dev : BBDB version 3.0.50 (2013-11-16 11:30:49 -0600)
Leo Alekseyev <dnquark <at> gmail.com> writes:
Hi all,It seems that a lot of the time, visual selection for me is
visually off by one character. For example, consider the following line, with the cursor at BOL.
(123)
If I issue commands like "vf)", "v%", I end with the closing paren under
the cursor, but the visual mark will NOT include the closing paren, and will only include the first 3 characters, "(123". Now, it is important to note that if I then try to yank the selection, the yanked region is exactly what it should be, i.e. it will include the closing paren. As such, this defect for me is purely cosmetic, but a little annoying. Is this a known issue? Is it possible there is some misconfiguration on my part?
Thanks,
--Leo
In the Vim manual it is stated that ) is as an 'exclusive' motion, and % is an 'inclusive' motion. Does this have anything to do with this? Shouldn't both be giving different results? ( motion : http://vimhelp.appspot.com/motion.txt.html#object-motions % motion : http://vimhelp.appspot.com/motion.txt.html#various-motions
Am 21.05.2014 15:42, schrieb Sujith Abraham:
In the Vim manual it is stated that ) is as an 'exclusive' motion, and % is an 'inclusive' motion. Does this have anything to do with this?
Should not.
Shouldn't both be giving different results?
Yes. Up to now I have not been able to reproduce the problem. On my system everthing works as expected and the visual selection always includes the closing parenthesis. As long as nobody provides an example to reproduce the error it is almost impossible for me to find the problem (starting with a minimal configuration, a sequence of keystrokes, whether you work in X or terminal, preferably a screenshot as it is a "visual" issue), sorry. Best regards, Frank
On Sunday, 25 May 2014 at 11:41, Frank Fischer wrote:
Am 21.05.2014 15:42, schrieb Sujith Abraham:
In the Vim manual it is stated that ) is as an 'exclusive' motion, and % is an 'inclusive' motion. Does this have anything to do with this?
Should not.
Shouldn't both be giving different results?
Yes.
Up to now I have not been able to reproduce the problem. On my system everthing works as expected and the visual selection always includes the closing parenthesis. As long as nobody provides an example to reproduce the error it is almost impossible for me to find the problem (starting with a minimal configuration, a sequence of keystrokes, whether you work in X or terminal, preferably a screenshot as it is a "visual" issue), sorry.
Selection for me never includes the closing parenthesis. See attached screenshot. This is with fairly recent evil and emacs-snapshot but not quite up to date. See signature. HTH, eric -- : Eric S Fraga, GnuPG: 0xFFFCF67D : in Emacs 24.4.50.2 + Ma Gnus v0.12 + evil evil-git-e002a19 : BBDB version 3.1.2 (2014-05-06 11:45:08 -0500)
participants (5)
-
Allen Li -
Eric S Fraga -
Frank Fischer -
Leo Alekseyev -
Sujith Abraham