Re: Bug: extra character selected by triple-click
On Sat, May 28, 2011 at 09:01:36AM -0700, Huy wrote:
Hello,
I get different behaviors when triple-mouse-clicking on a line of text. - in gvim, the line is highlighted and the cursor is put on the character closest to the mouse click point. - when in emacs-mode, the line is highlighted and the cursor is put on the first character of the next line. - when in vimpulse-mode, the "line PLUS the first character of the next line" are highlighted and the cursor is put on the first character of the next line.
Vimpulse's bug is bad because if you then hit 'x', you will see that the first character of the next line is deleted as well as the the triple-clicked line.
This also causes problems in org-mode when I select multiple lines and, for example, try to do things like convert between headline and list.
Thanks for looking into this and awesome work guys! I love vimpulse. Huy
Another possibly-related bug. If I do visual-mode by hitting 'V', vimpulse models gvim and keeps the cursor on the current line. However, this is very different from emacs. As I said in the previous bug report, emacs puts the cursor on the *next* line. Vimpulse should do as emacs does. Otherwise, you get unexpected behavior. For example, in org-mode, if you select a line with a list item using 'V' and then do 'C-c *' to convert into a headline, a mysterious blank line appears, which doesn't happen in emacs mode when I triple-mouse-click that line. The difference seems to lie in where the cursor is placed after highlighting an entire line. So even though it's nice that 'V' currently looks like gvim, the semantics should not change from emacs, even if that means we lose the ability to look like gvim. Huy
Am Sat, 28 May 2011 09:59:38 -0700 schrieb Huy <[email protected]>:
On Sat, May 28, 2011 at 09:01:36AM -0700, Huy wrote: So even though it's nice that 'V' currently looks like gvim, the semantics should not change from emacs, even if that means we lose the ability to look like gvim.
This depends on who you ask. Many people want to have the vim-emulation to be as close to vim as possible, because they use both, vim and Emacs, and otherwise the commands your fingers are used to in vim do not work in Emacs. It is one goal of the evil project to get all visual regions compatible to Emacs. This happens by modifying the visual region to have Emacs semantics (in the case of linewise the cursor is moved to the next line) right before executing a command. In theory, this should allow all standard commands that work on the region to behave as expected. But to be honest, there may always be some bad cases, although we hope to cover 99% of them. All mouse-clicking events should just (in evil) enable the corresponding visual-modes (as this is case with vim and vim-mode as well). So this should again be compatible with Emacs. Frank
participants (2)
-
Frank Fischer -
Huy