bugGNU nano - Bugs: bug #50164, using a dead key shows the cursor...

 
 

bug #50164: using a dead key shows the cursor a place further than where it actually is

Submitted by:  Frédéric Camblor <fcamblor>
Submitted on:  Fri 27 Jan 2017 06:44:26 PM UTC  
 
Severity: 3 - NormalStatus: Works For Me
Assigned to: Benno Schulenberg <bens>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon 30 Jan 2017 07:48:57 PM UTC, comment #7:

Okay. Although I don't know what exactly fixed your problem, there have been quite a few changes to the way lines are displayed and the column position is calculated. These changes were made with the intention to speed things up a bit, using knowledge of UTF-8 to take shortcuts, but it seems they had a corrective effect too.

Closing, as the problem is no longer there. Thanks for reporting, and for answering my questions.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Mon 30 Jan 2017 09:10:36 AM UTC, comment #6:

> Okay, understood: after using a dead key, the cursor would be shown one position beyond where it actually is -- when you type a new character, the cursor will not appear right after the character, but one step beyond.


Exactly

> If you use a dead key for multiple characters on a line, would the cursor then appear as many postions too far? Or always just one position?


Yep, the video was showing it (and I forgot to mention it) : if you type êê, the cursor will be here : êê__[] (2 spaces after the last ê)

> Hmm. Your locale output looks strange. But trying to mimic your setup, I still cannot reproduce the cursor misplacement with nano-2.5.3. If instead you use 'LC_ALL=utf-8 nano' to run nano, does the cursor misplacement then go away?
> (If you don't want to reinstall nano-2.5.3 for testing, then let it be. But if you do reinstall, then please type the <x> <x> <caret> <e> <o> <o> into an empty buffer, save it to a file, xeo.txt, and attach that file here -- to verify that your Mac is generating an ê (e-circonflex) and not a normal e with a combining circonflex.)


Sorry, I can't downgrade easily to a previous version with homebrew.

Frédéric Camblor <fcamblor>
Sat 28 Jan 2017 11:23:48 AM UTC, comment #5:

Okay, understood: after using a dead key, the cursor would be shown one position beyond where it actually is -- when you type a new character, the cursor will not appear right after the character, but one step beyond.

If you use a dead key for multiple characters on a line, would the cursor then appear as many postions too far? Or always just one position?

Hmm. Your locale output looks strange. But trying to mimic your setup, I still cannot reproduce the cursor misplacement with nano-2.5.3. If instead you use 'LC_ALL=utf-8 nano' to run nano, does the cursor misplacement then go away?

(If you don't want to reinstall nano-2.5.3 for testing, then let it be. But if you do reinstall, then please type the <x> <x> <caret> <e> <o> <o> into an empty buffer, save it to a file, xeo.txt, and attach that file here -- to verify that your Mac is generating an ê (e-circonflex) and not a normal e with a combining circonflex.)

(About the video... My browser would have to decode the stream of data, though, and I don't trust the decoder to be bugfree. And before getting that stream of data, I would have to allow Javascript from several domains, which I don't trust either... Paranoid? Hmm. Just a little. :) )

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Fri 27 Jan 2017 09:37:21 PM UTC, comment #4:

> Second, with "remanent keys" you mean dead keys? Keys that do nothing until you press the next key? So <caret> by itself does nothing, <caret> <space> gives a ^, and <caret> <e> gives ê? (You see, I don't have dead keys -- I use a Compose key when I need accents.)


Yep that's exactly it, dead keys.

> Third, what do you mean with "keeps the 2 strikes"? I can't make sense of it.


This is an assumption here : to create the ê, I had to make 2 "strokes" (as you said, "ˆ", then "e") and I guess that's the reason why the cursor/caret shifted twice (and not once).

> When you type <x> <x> <caret> <e> <o> <o>, you should see this:

"xxêoo". Are you saying that you see "xx êoo" instead?

That's too bad you cannot have a look at the (online) videos published (no need for you to "execute" it locally ... it's like youtube) since it would be more comprehensive that my (poor) explanations :-)

When I'll type <x> <x> <ˆ> <e> <o> <o> I will see :
xxêoo (what is expected)

However, the cursor will be placed one space after the last <o> (and not just after it) :
expected : xxêoo[] ([] is the caret)
actual : xxêoo [] (notice the space between o and cursor)

Note that this happen with every dead keys (not restricted to "ˆ")

> You are doing this in a terminal? What terminal? iTerm2? Something else? And what is your locale? The output of the command 'locale'.


Yes, in a terminal, iTerm 2.
Output of locale command :
LANG=
LC_COLLATE="C"
LC_CTYPE="utf-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

Regards,

Frédéric Camblor <fcamblor>
Fri 27 Jan 2017 08:03:01 PM UTC, comment #3:

It's good to hear that the issue is solved. But I'd still like it if you could answer my questions, so that I can see if I can reproduce the problem with 2.5.3. Also, did it happen only with the caret? Or also with grave and aigu?

(I think only nano administrators have the privileges to close issues.)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Fri 27 Jan 2017 07:36:48 PM UTC, comment #2:

> First, how come you use 2.5.3? Does it come with OS X? Or did you compile it yourself? If the latter, please upgrade to 2.7.4.


I used homebrew, an OS X package manager (http://brew.sh/).
2.7.4 was available, I just upgraded to this version and .... it solved the issue :-)

Thanks :)

BTW, should I close the issue by myself (do I have enough privileges to ?) ?

Frédéric Camblor <fcamblor>
Fri 27 Jan 2017 07:14:02 PM UTC, comment #1:

First, how come you use 2.5.3? Does it come with OS X? Or did you compile it yourself? If the latter, please upgrade to 2.7.4.

Second, with "remanent keys" you mean dead keys? Keys that do nothing until you press the next key? So <caret> by itself does nothing, <caret> <space> gives a ^, and <caret> <e> gives ê? (You see, I don't have dead keys -- I use a Compose key when I need accents.)

Third, what do you mean with "keeps the 2 strikes"? I can't make sense of it.

Sorry, I won't be looking at binary files (videos, pictures, anything like that), so you will have to try hard to describe what you see.

When you type <x> <x> <caret> <e> <o> <o>, you should see this:
"xxêoo". Are you saying that you see "xx êoo" instead?

You are doing this in a terminal? What terminal? iTerm2? Something else? And what is your locale? The output of the command 'locale'.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Fri 27 Jan 2017 06:44:26 PM UTC, original submission:

Tested on nano 2.5.3 under Mac OS X, when I type some chars with remanent keys (for instance : ê is made if "ˆ" then "e") nano makes it a single letter, but keeps the 2 strikes for caret (thus, shifting it from the position we would expect it to be)

I demonstrated this issue on this video : https://vimeo.com/201271030

It may be something related to #50134

Frédéric Camblor <fcamblor>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Posted a comment)
  • -unavailable- added by fcamblor (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 30 Jan 2017 07:48:57 PM UTCbensStatusNeed Info=>Works For Me
      Open/ClosedOpen=>Closed
      SummaryRemanent keys seems to misplace caret=>using a dead key shows the cursor a place further than where it actually is
    Fri 27 Jan 2017 07:14:02 PM UTCbensStatusNone=>Need Info
      Assigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1