Author Topic: Word chars are not fully honoured  (Read 886 times)

hatboots

  • Community Member
  • Posts: 11
  • Hero Points: 0
Word chars are not fully honoured
« on: September 29, 2021, 04:00:28 PM »
I am from Norway. As a Norwegian, I need the additional Norwegian characters when I write Norwegian (e.g. comments are often written in Norwegian when programming). The characters in question are "æøå" and "ÆØÅ" (lower case and upper case, respectively).

Consequently, every language definition in my installation have the following definition of characters being part of a word:
Tools --> Options --> Languages --> <pick-your-language, e.g. Bourne Shell> --> Word Chars: "a-zA-Z0-9æøåÆØÅ_"

Still, if any of the characters æøåÆØÅ are encountered, the cursor stops in the middle of a word when moving the cursor (typing <Ctrl>+<RightArrow>) as if it was a word break.

This actually worked properly in the 2014 to 2019 editions, so I haven't experimented by changing the Word chars content, except for moving "_" to the very end, and it stopped working in the 2020 edition. Now it seems it is going to be carried over into 2021. I hope it will not.  ;)
(2014 was my first SlickEdit edition. I am and always have been using Brief emulation with SlickEdit).

Also:
So far in the beta, I have only tested the Linux variant, but this problem is also valid for both Linux and Windows 64 bit of the 2020 Pro edition (no surprise there - Slick-C OS isolation ...).

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Word chars are not fully honoured
« Reply #1 on: September 29, 2021, 05:20:57 PM »
I need to look more closely at why this is, but for me I'm getting that behavior when "subword navigation" is enabled.  To make sure I'm seeing the same thing, if you disable that option under Tools -> Options -> Editing -> Cursor Movement, does it work for you then?

hatboots

  • Community Member
  • Posts: 11
  • Hero Points: 0
Re: Word chars are not fully honoured
« Reply #2 on: September 29, 2021, 06:44:50 PM »
Yes, that kind of solves it. But typing "æøå" is like typing "abc" (as "ÆØÅ" is like typing "ABC"). They are all lower case (or, in the parathesis, upper case), it is not CamelCasing.

Also, I just checked the 2019 edition, the "subword navigation" is present there too, and it is working properly there having "subword navigation" active.
Well - correction:
I just detected this while testing now: It is working properly when moving the cursor forward - not when going backward. Clearly I am not in the habit of skipping by word backwards.

Checking 2021 beta 3:
Hmmm. It is becoming clear to me that my testing - and experience - haven't been detailed enough. I have to look more at this to provide better description of the problem. And it doesn't seem that the 2019 edition handles this fully either. Sorry for that. I'll be back with details after some more testing.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Word chars are not fully honoured
« Reply #3 on: September 29, 2021, 06:50:09 PM »
No worries, I was just verifying I was seeing the same problem.  Mine gets stuck going backwards too. There is definitely a bug with the subword navigation, I'm going to try to fix that for beta 4.


hatboots

  • Community Member
  • Posts: 11
  • Hero Points: 0
Re: Word chars are not fully honoured
« Reply #4 on: September 29, 2021, 06:57:24 PM »
OK, thank you.

Then I'll await beta 4 or your request for more info before I do more here.

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: Word chars are not fully honoured
« Reply #5 on: September 29, 2021, 08:31:53 PM »
Also, maybe the wordchars should be different inside comments?
This allows for programming languages where the identifiers are limited to, for example, [a-z], but inside comments the user would like to use their native language with more/different letters.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Word chars are not fully honoured
« Reply #6 on: September 29, 2021, 11:47:30 PM »
Fixed for beta 4.

hatboots

  • Community Member
  • Posts: 11
  • Hero Points: 0
Re: Word chars are not fully honoured
« Reply #7 on: September 30, 2021, 11:15:21 PM »
Wonderful. Thank you. I look forward to beta 4.

hatboots

  • Community Member
  • Posts: 11
  • Hero Points: 0
Re: Word chars are not fully honoured
« Reply #8 on: October 04, 2021, 08:46:53 PM »
Beta4, still Linux 64bit as described in the OP:
This works now, except for one exception (what I can see).

Works:
As long as the cursor is not in virtual space, this work as expected (=properly) both forward and backward using <Ctrl>+<left or right cursor key> with my Norwegian characters.

Does not work when doing as follows:
  • The cursor is positioned on a line of text somewhere (I haven't tested this at the very top/bottom positions of a file), and also somewhere on the far right of that line.
  • The next line is a simple "\n" (the control character, Linux' EOL).
  • I press <cursor down>, putting the cursor in virtual space.
  • I press <Ctrl>+<left cursor key>
This yields an error message/dialog saying "Slick-C Error: Invalid argument" followed by a stack trace as follows:
Code: [Select]
Stack trace written to file: /tmp/vsstack.xidxx
 Invalid argument
 0x0x80c270 -UTF8IsAlpha()   p_window_id: 240   p_object: OI_EDITOR   p_name:
stdcmds.ex 25978 stdcmds:isLowercase()   p_window_id: 240   p_object: OI_EDITOR   p_name:
stdcmds.ex 24306 stdcmds:skip_subword(-,1)   p_window_id: 240   p_object: OI_EDITOR   p_name:
stdcmds.ex 22409 prev_word()   p_window_id: 240   p_object: OI_EDITOR   p_name:

Please note: The error isn't triggered if I hit <Ctrl>+<right cursor key> to go forward instead.

I am using Brief emulation.
Also see other configuration alternatives of mine in the attached file - a screen dump of what I have the impression are the configuration details of most interest here. Please advise if you need more configuration details.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6875
  • Hero Points: 530
Re: Word chars are not fully honoured
« Reply #9 on: October 04, 2021, 10:49:24 PM »
Fixed for next build. Thanks for posting.