bugGNU nano - Bugs: bug #52576, nano too eagerly resets the flag...

 
 

bug #52576: nano too eagerly resets the flag for prepending wrapped stuff

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Sat 02 Dec 2017 04:34:25 PM UTC  
 
Severity:  3 - Normal Status:  Fixed
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.

 

Thu 07 Dec 2017 06:44:53 PM UTC, comment #4:

Fixed in git with commits 29f7654a and b4411b4f.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Mon 04 Dec 2017 06:05:29 PM UTC, comment #3:

Attached is a second version of the second patch. With this patch, nano becomes slightly better than Pico -- where pushing words onto the same continuation line is concerned.

For example, run 'pico -r72 threelines' and type: <Ctrl+Right> <Ctrl+Right> <Enter> www eee rrr ttt <Home> <Backspace> aaa. Notice how Pico, after the first "a", creates a new continuation line. Now do the same in nano: run 'src/nano -r72 +1 threelines' and type: <Ctrl+Right> <Ctrl+Right> <Enter> www eee rrr ttt <Home> <Backspace> aaa. See how after the first "a" continues to push words onto the same continuation line as before. Great! That's the way it should work.

(file #42567)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sat 02 Dec 2017 07:05:04 PM UTC, comment #2:

Attached is a first attempt at fixing this.

(Works a bit too good. When pressing <Delete> at the end of the current line, nano may continue to prepend wrapped words to the line that then has become the next line -- if that line is short enough to accomodate all of the words that get wrapped at once. Pico will not do this: it will never prepend to a line it has not created itself for this purpose. But... let this pass for now.)

(file #42559, file #42560)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sat 02 Dec 2017 04:52:33 PM UTC, comment #1:

Bug exists since at least nano 2.0.9 (I haven't checked further back).

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sat 02 Dec 2017 04:34:25 PM UTC, original submission:

To see what I mean, run:

grep -C1 working README.GIT >threelines

Then run:

pico -r72 threelines

and type three times: www <Space>. See how three words get pushed to a new, separate line. Now type <Ctrl+Left> or <Ctrl+Right> twice, and then continue to type a few "words". See how more words from the current line get pushed to the next line -- still the same line that was used at the beginning. Now type <Backspace> or <Delete> a few times, and then continue to type more words. See how still more words get pushed to the same second line. (As seen on Pico 5.07.)

Now run:

nano -r72 +1 threelines

and type the same things: three times www <Space>, followed by twice <Ctrl+Left> or <Ctrl+Right>, followed by more words. Notice that after moving the cursor, nano creates a new, extra line to push the wrapped words on to. Then type <Backspace> or <Delete> a few times and continue to type more words. Again, nano creates another new line to push the wrapped words on to. This is unnecessary and a nuisance.

Expected behavior: As long as the cursor stays on the same line, and the wrapped words don't make the next line too long, any wrapped words should continue to be prepended to the line that nano created for this purpose. Just like Pico.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.

 

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

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-01-03 bens Open/ClosedOpen => Closed
    2017-12-07 bens StatusIn Progress => Fixed
    2017-12-04 bens Attached File- => Added 0002-wrapping-we-re-still-on-the-same-line-if-the-next-li.patch, #42567
    2017-12-02 bens Attached File- => Added 0001-wrapping-keep-prepending-to-the-same-next-line-as-lo.patch, #42559
        Attached File- => Added 0002-wrapping-compare-persistent-line-numbers-instead-of-.patch, #42560
        StatusNone => In Progress
        Assigned toNone => bens

    Back to the top


    Powered by Savane 3.3