Author Topic: Automatic selection in Vim emulation in 14.0.2.2?  (Read 4499 times)

GregKrasnow

  • Community Member
  • Posts: 15
  • Hero Points: 0
Automatic selection in Vim emulation in 14.0.2.2?
« on: January 28, 2010, 06:59:16 pm »
It appears that when I am using Vim emulation mode, any cursor movements I do are automatically setting the selection.  This makes using this difficult as I have to always clear the selection before I can do anything or else everything I do affects the entire selection.  I tried playing with the settings in the selection options, but nothing seems to cause this behavior to stop.  Has anyone else experienced this, and if so, how did you get around it?  Thanks.

- Greg

GregKrasnow

  • Community Member
  • Posts: 15
  • Hero Points: 0
Re: Automatic selection in Vim emulation in 14.0.2.2?
« Reply #1 on: January 28, 2010, 07:47:50 pm »
BTW this is on the Windows version running on 64-bit Vista.  Thanks.

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 987
  • Hero Points: 77
Re: Automatic selection in Vim emulation in 14.0.2.2?
« Reply #2 on: January 28, 2010, 09:16:58 pm »
Hey Greg,

I haven't experienced that, and I'm not quite sure how you got into that state, but it kind of sounds like visual mode is stuck on, somehow.  Certainly that would account for any cursor movements extending or setting a selection.  In command mode, if you do 'v', that should toggle visual mode. 

When you hit 'v' the status area (bottom left of the editor, where the SE command line is) should say either -- COMMAND -- or -- VISUAL --.  If it indicates visual mode, do it again...and it should indicate command mode.  Now if you do cursor movements is text still being selected?  What if you try running clear-highlights?  Does it persist if you restart SlickEdit?  If not, can you identify what triggered the editor to get in this state?

- Ryan

GregKrasnow

  • Community Member
  • Posts: 15
  • Hero Points: 0
Re: Automatic selection in Vim emulation in 14.0.2.2?
« Reply #3 on: January 28, 2010, 10:42:51 pm »
Ryan,

I am in command mode, not visual mode.  It seems to mostly occur when using Ctrl-B/Ctrl-F to page up/page down though it has occured with other cursor movements as well.  It happens even if I shutdown/restart SlickEdit and clear-highlights does not appear to help.  Even the normal page-up/page-down keys cause this.  The mouse wheel scroll does not however.

- Greg

Hey Greg,

I haven't experienced that, and I'm not quite sure how you got into that state, but it kind of sounds like visual mode is stuck on, somehow.  Certainly that would account for any cursor movements extending or setting a selection.  In command mode, if you do 'v', that should toggle visual mode. 

When you hit 'v' the status area (bottom left of the editor, where the SE command line is) should say either -- COMMAND -- or -- VISUAL --.  If it indicates visual mode, do it again...and it should indicate command mode.  Now if you do cursor movements is text still being selected?  What if you try running clear-highlights?  Does it persist if you restart SlickEdit?  If not, can you identify what triggered the editor to get in this state?

- Ryan

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 987
  • Hero Points: 77
Re: Automatic selection in Vim emulation in 14.0.2.2?
« Reply #4 on: February 02, 2010, 04:34:17 pm »
Hey Greg,

I'd really like to try to figure out why this is happening, if you have a few minutes to help me debug it, I'd really appreciate it...if not, no worries.

Backup your local copy of macros/vivmode.e, save the attached version locally, and load it via Macro > Load Module.  Now do a Ctrl-B or Ctrl-F which extends or creates a selection, and tell me what, if any, statements are output to the vsapi.dll debug window.  These commands (vi-page-up, vi-page-down) do run vi-visual-select, which should only create or extend a selection if character/line/block visual mode is on.  This should let me know if this is the problem or not.

While you are in this state, if you hit 'v', does the problem go away?  That should toggle the visual mode def var that is on, if this is the problem.

Can you post a screenshot of your Tools > Options > Editing > Selections screen?

Thanks.

- Ryan

EDIT:  You will want to load your original copy of vivmode.e after you are done testing this, so that you don't keep getting messages output to the debug popup window.

GregKrasnow

  • Community Member
  • Posts: 15
  • Hero Points: 0
Re: Automatic selection in Vim emulation in 14.0.2.2?
« Reply #5 on: February 04, 2010, 06:16:55 am »
Ryan,

Ctrl-F caused "selecting block..." to show up in the debug window.
However, when I hit 'v' to go into VISUAL mode and then hit 'v' again to get out of VISUAL mode, then I stopped noticing the problem.  Could some setting be causing SE to think that it is in VISUAL mode even when it is not?  Thanks.

Also, I noticed that even after I close and re-open SE everything seems to be working fine now. 

- Greg

Hey Greg,

I'd really like to try to figure out why this is happening, if you have a few minutes to help me debug it, I'd really appreciate it...if not, no worries.

Backup your local copy of macros/vivmode.e, save the attached version locally, and load it via Macro > Load Module.  Now do a Ctrl-B or Ctrl-F which extends or creates a selection, and tell me what, if any, statements are output to the vsapi.dll debug window.  These commands (vi-page-up, vi-page-down) do run vi-visual-select, which should only create or extend a selection if character/line/block visual mode is on.  This should let me know if this is the problem or not.

While you are in this state, if you hit 'v', does the problem go away?  That should toggle the visual mode def var that is on, if this is the problem.

Can you post a screenshot of your Tools > Options > Editing > Selections screen?

Thanks.

- Ryan

EDIT:  You will want to load your original copy of vivmode.e after you are done testing this, so that you don't keep getting messages output to the debug popup window.
« Last Edit: February 04, 2010, 06:22:03 am by GregKrasnow »

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 987
  • Hero Points: 77
Re: Automatic selection in Vim emulation in 14.0.2.2?
« Reply #6 on: February 04, 2010, 03:36:11 pm »
Quote
However, when I hit 'v' to go into VISUAL mode and then hit 'v' again to get out of VISUAL mode, then I stopped noticing the problem.  Could some setting be causing SE to think that it is in VISUAL mode even when it is not?

Yes, that's what I suspected was happening, and I was just looking for some confirmation about that with the debug macro file I sent you.  This helps, I'll see if I can pinpoint why this happened to you and get a fix for it.  Glad you have gotten rid of it, though.

- Ryan

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 987
  • Hero Points: 77
Re: Automatic selection in Vim emulation in 14.0.2.2?
« Reply #7 on: February 04, 2010, 04:38:28 pm »
Ok, I found 3 different spots where block visual mode could possibly not get toggled off when it should.  They all involve commands when we are entering block insert mode...do you remember using that at all/often?  For example, create a block selection in Vim and hit 'i'...SlickEdit will enter block insert mode.  Now just hit 'ESC', which should bounce out of both block insert mode and visual mode, but it doesn't.  So if you cursor anywhere now, the selection is extended.  This would also happen with the 'c' and 'C' commands if you have a block selection.

Does this sound like what you did?  This particular issue is now fixed in 2010.

- Ryan

GregKrasnow

  • Community Member
  • Posts: 15
  • Hero Points: 0
Re: Automatic selection in Vim emulation in 14.0.2.2?
« Reply #8 on: February 04, 2010, 09:37:06 pm »
That could quite possibly be what happened.  I think I entered block insert mode at one point and then realized that is not what I wanted to do and then "ESC"aped out of it. 

- Greg

Ok, I found 3 different spots where block visual mode could possibly not get toggled off when it should.  They all involve commands when we are entering block insert mode...do you remember using that at all/often?  For example, create a block selection in Vim and hit 'i'...SlickEdit will enter block insert mode.  Now just hit 'ESC', which should bounce out of both block insert mode and visual mode, but it doesn't.  So if you cursor anywhere now, the selection is extended.  This would also happen with the 'c' and 'C' commands if you have a block selection.

Does this sound like what you did?  This particular issue is now fixed in 2010.

- Ryan