bugGNU nano - Bugs: bug #63407, with --autoindent and...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #63407: with --autoindent and --breaklonglines, pressing Enter can eat text before the cursor

Submitter:  Tasos Papastylianou <tpapastylianou>
Submitted:  Wed 23 Nov 2022 03:20:10 PM UTC
 
Severity:  5 - Blocker Status:  In Progress
Assigned to:  bens Open/Closed:  Open

Fri 25 Nov 2022 08:10:30 AM UTC, comment #5: 

Complete patch with commit message is now attached.

(file #54013)

Benno Schulenberg <bens>
Project Administrator
Thu 24 Nov 2022 11:47:16 AM UTC, comment #4: 

Attached patch should fix the issue.  Can you confirm, Tasos?

(file #54004)

Benno Schulenberg <bens>
Project Administrator
Thu 24 Nov 2022 11:39:24 AM UTC, comment #3: 

Bug has existed since version 2.9.8.  :/  The offending commit is d00ab406: "when autoindenting, use indentation of next line as example".

The problem is that part of the "Enter" code still assumes that the sampleline is the current line.

(At first I couldn't reproduce this on my other machine, the one that I use for bisecting, because it is much faster.  I had to rerun ./configure to achieve reproduction.  Unfortunately I didn't keep the previous config.log to be able to see what was changed.  :| )

Benno Schulenberg <bens>
Project Administrator
Thu 24 Nov 2022 10:20:26 AM UTC, comment #2: 

Just to add, in case it is useful information, this has been there for a few versions, it's not a 7.0 thing. I think I first noticed it last year, or maybe even before that.

It's just that it's the first time I managed to reproduce the problem. Before that I just had disappearing html tags every now and then and wasn't quite sure why!

Tasos Papastylianou <tpapastylianou>
Thu 24 Nov 2022 08:24:32 AM UTC, comment #1: 

Owww...  Badness.

Reproduction recipe:

printf "two words\n  second line\n"  >words

src/nano --ignore --auto --break  +,3 words

Then press Enter.  See how "tw" from the first word has disappeared.  M-U does not bring it back.

Benno Schulenberg <bens>
Project Administrator
Wed 23 Nov 2022 03:20:10 PM UTC, original submission:  

Steps to reproduce:

1. Enable hard wrap
2. Type some text in one line
3. type some text below it, indented two characters in, relative to first line
4. place cursor in first line, two characters in (i.e. such that it is aligned with the start of the second line), and press enter.

Expected bug behaviour: The first two characters will disappear. Pressing 'undo' will not be able to bring them back.

Tasos Papastylianou <tpapastylianou>

 

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-11-25 bens Attached File- Added 0001-text-upon-Enter-eat-only-lefthand-blanks-not-any-oth.patch, #54013
    2022-11-24 bens Attached File- Added verify-all-blanks-before-cursor.patch, #54004
    2022-11-24 bens StatusNone In Progress
        SummaryPressing enter with Hard Wrap enabled consumes text without ability to undo. with --autoindent and --breaklonglines, pressing Enter can eat text before the cursor
    2022-11-24 bens Severity3 - Normal 5 - Blocker
        Assigned toNone bens
    2022-11-23 tpapastylianou Attached File- Added demonstration_of_disappearing_html_tag_bug, #53995

    Back to the top


    Powered by Savane 3.9