bugGNU nano - Bugs: bug #48154, [Request] show feedback when...

 
 

bug #48154: [Request] show feedback when entering a Unicode codepoint

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Mon 06 Jun 2016 07:29:54 PM UTC  
 
Severity: 1 - WishStatus: Fixed
Assigned to: David Lawrence Ramsey <dolorous>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)

Sat 30 Jul 2016 09:06:40 AM UTC, comment #11:

Released in 2.6.2.

Benno Schulenberg <bens>
Project Administrator
Sun 24 Jul 2016 11:49:21 AM UTC, comment #10:

Pushed to git, fc0ddab.

Thanks!

Benno Schulenberg <bens>
Project Administrator
Sat 23 Jul 2016 08:04:35 PM UTC, comment #9:

Okay, I suppose I'm just paranoid about error checking sometimes. The attached version is fine. You go ahead and commit it; I'm not sure I still have commit rights, and I'm also rusty on some parts of git and would prefer not to screw things up unnecessarily.

Thanks in advance.

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.
Sat 23 Jul 2016 07:30:45 PM UTC, comment #8:

The 'if (uni_digits < 6)' is not necessary, because when the unicode is complete, the program doesn't get there. Also, I don't like the cursor being displayed in the edit window while things are happening on the statusbar, so I've removed that part.

If you're okay with the attached version, you can commit it. (Or I can do that, if you prefer.)

(file #38004)

Benno Schulenberg <bens>
Project Administrator
Sat 23 Jul 2016 04:58:50 PM UTC, comment #7:

Good to know. I've moved the printing into get_unicode_kbinput() in the new version (unicode-with-dots-improved.patch). I also tweaked the right-padding display code so that it doesn't need a second variable (it's still ugly, but printf()'s built-in support for right-padding seems to be very limited).

(file #38001)

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.
Sat 23 Jul 2016 09:05:49 AM UTC, comment #6:

Whether it's parse_verbatim_kbinput() or get_unicode_kbinput() that does the printing doesn't make much difference, intertwiningwise. It's nicer when the routine that's called "get_unicode..." actually prints the code.

I don't want to do the same for <Esc> <Esc> three digits. Most people can keep track of three steps. But with Unicode input... In the beginning I often aborted, because I had forgotten what I had typed; I had to train myself to keep track of the sequence.

Also, in a UTF8 locale, the usefulness of Esc-Esc is very limited. When people need higher codes, they will have to use Unicode Input, and once they know that, they will likely use it for everything, because they will know the hexadecimal codes, not the decimal ones. Also, not giving feedback for Esc-Esc makes for extra contrast between the two modes.

Benno Schulenberg <bens>
Project Administrator
Fri 22 Jul 2016 08:24:41 PM UTC, comment #5:

Looks good to me. I don't know how to do it in a single printf() either, and printf()'s options can get horribly complex. Indeed, maybe it would be nicer to do it in get_unicode_kbinput(), but I was trying to keep the input and output routines separate when I could.

Incidentally, should this type of feedback also be done for nano's byte input mode (Esc Esc [3-digit number sequence between 000-255] produces a byte with the associated value)? Currently, it doesn't, because the same functionality in Pico doesn't.

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.
Fri 22 Jul 2016 06:41:01 PM UTC, comment #4:

Better. But I don't like the sideways expansion during input: a digit, once typed, doesn't stay in the exact same spot. And the lack of dots doesn't show the user how many more digits there are left to type. So I've tweaked it to the attached version.

It's a bit ugly, because I don't know how to do that in a single printf(), and the extra variable is just a silly name. Also, probably it would be nicer to let get_unicode_kbinput() itself print the statusbar and not pass the partial result back.

(file #37990)

Benno Schulenberg <bens>
Project Administrator
Fri 22 Jul 2016 02:45:56 PM UTC, comment #3:

Okay. Attached an improved version against current git which should do this.

(file #37989)

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.
Fri 22 Jul 2016 08:31:27 AM UTC, comment #2:

Hi David,

Thanks for the patch! It works well. But... I don't like the look of "000000" when I've just typed the first zero. When I've typed, say, 0120, it is impossible to see how many digits I have typed. So it would be much nicer if after the first digit, the display would look like "Unicode Input: 0.....", and after 0120: "Unicode Input: 0120..". This will be harder to make, but it makes it so much clearer what has been typed and how many more digits are expected.

Benno Schulenberg <bens>
Project Administrator
Wed 20 Jul 2016 05:57:14 PM UTC, comment #1:

Attached an attempt at this, as of today's git. Note that the statusbar message is "Unicode Input: XXXXXX" in all cases, so that there isn't both a "Unicode Input" message and an "Entering Unicode: XXXXXX" message. This also attempts to guarantee that, when Unicode input is used in the edit window, the cursor remains visible in the edit window.

(file #37958)

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.
Mon 06 Jun 2016 07:29:54 PM UTC, original submission:

When you type M-V 0, the statusbar will show: "Unicode Input". The other five hex digits you will have to type blind. It would be much nicer if the statusbar would show "Entering Unicode: 0" and then add the digits as you type them.

Benno Schulenberg <bens>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #38003:  unicode-plus-dots-improved2.patch added by dolorous (3KiB - text/x-patch - Updated to fix unneeded mallocstrcpy().)
file #37990:  unicode-plus-dots.patch added by bens (3KiB - text/x-diff)
file #37959:  nano-unicode-feedback2.patch added by dolorous (3KiB - text/x-patch - Updated to fix unneeded debug info.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dolorous (Updated the item)
  • -unavailable- added by bens (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 13 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 30 Jul 2016 09:06:40 AM UTCbensOpen/ClosedOpen=>Closed
    Sun 24 Jul 2016 11:49:21 AM UTCbensStatusIn Progress=>Fixed
    Sat 23 Jul 2016 07:30:45 PM UTCbensAttached File-=>Added unicode-plus-dots-sans-cursor.patch, #38004
    Sat 23 Jul 2016 06:07:45 PM UTCdolorousAttached File-=>Added unicode-plus-dots-improved2.patch, #38003
    Sat 23 Jul 2016 06:07:18 PM UTCdolorousAttached File#38001=>Removed
    Sat 23 Jul 2016 04:58:50 PM UTCdolorousAttached File-=>Added unicode-plus-dots-improved.patch, #38001
    Sat 23 Jul 2016 09:05:49 AM UTCbensStatusNone=>In Progress
      Assigned toNone=>dolorous
    Fri 22 Jul 2016 06:41:01 PM UTCbensAttached File-=>Added unicode-plus-dots.patch, #37990
    Fri 22 Jul 2016 02:45:56 PM UTCdolorousAttached File-=>Added nano-unicode-feedback-improved.patch, #37989
    Wed 20 Jul 2016 06:08:01 PM UTCdolorousAttached File-=>Added nano-unicode-feedback2.patch, #37959
    Wed 20 Jul 2016 06:07:24 PM UTCdolorousAttached File#37958=>Removed
    Wed 20 Jul 2016 05:57:14 PM UTCdolorousAttached File-=>Added nano-unicode-feedback.patch, #37958

    Back to the top


    Powered by Savane 3.1-cleanup1