Author Topic: Multiline entry inserting a colon malfunctioning  (Read 6097 times)

poboxbrian

  • New Community Member
  • Posts: 1
  • Hero Points: 0
Multiline entry inserting a colon malfunctioning
« on: February 17, 2007, 10:47:18 pm »
I've been using SlickEdit 9 for years, and three months ago, a multiline edit that includes a colon malfunctions.  If I hit ^B, select multiple lines, and then try to type ":= Parameter", only the last line will get the ':' included in it.
What I expect:

strParm1 := Parameter "parm1" As String
strParm2 := Parameter "parm2" As String
strParm3 := Parameter "parm3" As String
strParm4 := Parameter "parm4" As String

What I get

strParm1 = Parameter "parm1" As String
strParm2 = Parameter "parm2" As String
strParm3 = Parameter "parm3" As String
strParm4 := Parameter "parm4" As String
.

Has anyone else ran into this issue and have an idea on how to fix it? Please  ???

jbhurst

  • Senior Community Member
  • Posts: 405
  • Hero Points: 33
Re: Multiline entry inserting a colon malfunctioning
« Reply #1 on: February 18, 2007, 07:12:41 pm »
The behavior you're looking for is called "Block insert mode".

If you have "Extend selection as cursor moves" checked in Tools | Options | Select Styles, you should get this behavior immediately while you are extending your selection. This works for me with Visual SlickEdit 9.0.4. After the selection is locked (by pressing Ctrl-B again), you need to invoke Edit | Other | Block insert mode explicitly to get into the mode. 

If you don't have "Extend selection as cursor moves" checked, you will need to invoke Block insert mode explicitly.

Outside of block insert mode, typing characters inserts only at the cursor position. This is often useful and is consistent with other behavior of SlickEdit's locked selections.

I believe at some in SlickEdit's history (perhaps when block insert mode was added?) the behavior was different, putting the editor into block insert mode all the time when a block selection was made. I can't recall exactly which version this was though. The current behavior seems to be the same as SE 9.0.4.

Regards

John Hurst

Phil Barila

  • Senior Community Member
  • Posts: 742
  • Hero Points: 61
Re: Multiline entry inserting a colon malfunctioning
« Reply #2 on: February 18, 2007, 08:56:21 pm »
Works correctly in the 2007 (v12) Beta 2 drop.  Lot of new, useful tools added since v9.

Graeme

  • Senior Community Member
  • Posts: 2446
  • Hero Points: 322
Re: Multiline entry inserting a colon malfunctioning
« Reply #3 on: February 19, 2007, 09:58:21 am »
I've been using SlickEdit 9 for years, and three months ago, a multiline edit that includes a colon malfunctions.  If I hit ^B, select multiple lines, and then try to type ":= Parameter", only the last line will get the ':' included in it.
What I expect:

strParm1 := Parameter "parm1" As String
strParm2 := Parameter "parm2" As String
strParm3 := Parameter "parm3" As String
strParm4 := Parameter "parm4" As String

What I get

strParm1 = Parameter "parm1" As String
strParm2 = Parameter "parm2" As String
strParm3 = Parameter "parm3" As String
strParm4 := Parameter "parm4" As String
.

Has anyone else ran into this issue and have an idea on how to fix it? Please  ???


The code that performs this multi-insertion is the "builtin" function _fill_selection - you can see where it's called from in util.e

Since you say the problem only started 3 months ago, that suggests some corruption somewhere - perhaps in your state file.  Before you try the suggestions below, backup your config folder.

First, you could try rebuilding util.e  -  on the slickedit cmd line type fp doBlockModeKey and util.e should get opened for you.  On the macro menu, select "load module".

If that doesn't help, try a brand new config folder.  There's several ways to go about this.

Method 1: Close slick and rename your existing config folder - this effectively becomes a backup.  Start slick - it should  create a new config folder and set up some defaults.  See if the problem with the colon character is gone.  If not, you might need to reinstall slick if you've already rebuilt util.e as suggested before.

Method 2: Create a new empty folder - say config2.  Use the switch -sc config2 in the command line that invokes slick - slick will then use config2 as the config folder and cerate some default setup.  See if the problem is gone.  If so, you could close slick, delete everything in config2, copy over everything from your original config folder except for the state file vslick.sta (it might have a different name on your platform).  Start slick using the config2 folder and see if the problem is still gone.  If this method works and you didn't try method1 yet, then you could go back to method1 but this time, create the default config folder manually and copy in all the files from your original config folder except for vslick.sta.

Graeme