bugGNU nano - Bugs: bug #65409, miscoloring of several lines after...

 
 

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

bug #65409: miscoloring of several lines after a justification

Submitter:  Benno Schulenberg <bens>
Submitted:  Mon 04 Mar 2024 07:46:12 AM UTC
   
 
Severity:  3 - Normal Status:  Invalid
Assigned to:  None Open/Closed:  Closed

Mon 04 Mar 2024 09:45:04 AM UTC, comment #1: 

It is the printing of the error message itself that interferes with the coloring of the affected line: it changes the value of the global variable 'till_x'.  :/

When shortening the error message to just "Missing multidata", then  only the first four words of the top line are colorized.

So, when multidata is properly produced and the error message does therefore not occur, then the coloring will work fine.

Benno Schulenberg <bens>
Group administrator
Mon 04 Mar 2024 07:46:12 AM UTC, original submission:  

Add the following two lines at the end of syntax/python.nanorc:

color brightblue "word"
color brightred "last"

Then create a test file, mmm.py:

for line in $(seq 23); do
  for word in $(seq 11); do
    echo -n "word ";
  done;
  echo "last";
done >mmm.py

src/nano --rc=syntax/python.nanorc --line  + mmm.py

The latter command should be run on a standard xterm (-geometry 80x24).

Now type: M-J

See that the last six words on the top line are not colored.

Now scroll up (with <Up> or <Alt+Up> or the mousewheel).  See that on lines 3 to 11 all last six words are not colored.  Absurd!

Exit and move the two added lines in the python.nanorc to before the "# Triple-quoted strings" comment, and run the same nano command again and type M-J.  Now the last words on the top line (and lines 3 to 11) are colored fine.  What?!

Benno Schulenberg <bens>
Group administrator

 

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

No files currently attached

 

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)
  •  

    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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-03-04 bens Open/ClosedOpen Closed
    2024-03-04 bens StatusNone Invalid
        Assigned tobens None
    2024-03-04 bens Summarymiscoloring of several lines after a justfication miscoloring of several lines after a justification

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code