Re: Insert New Line Bug?

Not sure how to classify this bug but here's the behavior I'm seeing in VS2010 c# code.

Here's the code to reproduce:

abstract public class Dog {
  abstract public void Bark();

public class Poodle : Dog {


Error List window:
Poodle does not implement inherited abstract member...

<doubleclick the error list item to take you to the Poodle.cs file>

Here's where the viemu bug happens:

When i place the cursor at "public class Poodle..." and press o to insert a new line, a new line isnt inserted.  The cursor jumps to "Poodle" and Poodle is highlighted and i seem to be switched into visual selection mode.

Hope this makes sense.


Re: Insert New Line Bug?

Just installed the unofficial "Beta" 2.5.8 and this issue is present in that build also.


Re: Insert New Line Bug?

Kingkaeru, just to be sure, does it happen only when you press F4 or double-click the error in the output window to take you there, or does it also happen when you just move the caret over the "public class Poodle"?. I can reproduce the first case, but not the second...


Re: Insert New Line Bug?

In fact I just checked that it happens to me if I go from the error list window (either by double clicking on the error or through F4), and not from the Output Window. The reason for this is that when going from the error window, the cursor goes to the line where the error is but it also selects the word ("Poodle" in this case). When ViEmu detects a VS selection it automatically enters visual mode and marks the Vs selection as a ViEmu visual range. In fact, this is a feature many people have asked for, along with the 'Use VS selection for visual mode' option, which is the opposite (when in visual mode, use VS selection along with ViEmu visual range, so that VS commands will work on it).
So, this issue is really a side-effect of that feature. I'll see what I can do about it, maybe make this feature optional too.
I'll let you know what's done about this, kingkaeru.


Re: Insert New Line Bug?

Thanks Isaac.  I don't understand why we need to be dropped into visual mode when the error occurs.  There are few instances when someone will want to be in visual mode when going to an error.  Usually you act on the error, like add a line, delete a word, or fix a typo.

Looking forward to a fix for this. smile


Re: Insert New Line Bug?

Kingkaeru, the rationale is that you may want to select some text with VS tools (the mouse, other add-ins, etc...) and then do, for example, 'y' to yank with ViEmu, 'd' to delete, etc... and visual mode is actually the vim-equivalent of having text selected in VS or standard editors.

In any case, of course it doesn't make much sense when double clicking on an error, so, as Isaac said, we'll try to find a way to make it sensible in all cases, or at least allow it as an option!

  -- Jon


Re: Insert New Line Bug?

I still am having the problem of _always_ being dropped into Visual mode the first time I click in a vs2010 file.

My love of viemu has really taken a toll due to this. But I gotta believe it's fixable!


Re: Insert New Line Bug?

dgennetten wrote:

I still am having the problem of _always_ being dropped into Visual mode the first time I click in a vs2010 file.

I find this very annoying also.  I only want to be in Visual mode when I do something via the keyboard to enable it.

(With the pre-2010 version of ViEmu, I was able to switch to Normal mode whenever a) VS lost focus, or b) the user changed buffers.  I hope that functionality is exposed again in ViEmu.)

Still a great product, despite the gripes...