bugGNU nano - Bugs: bug #51335, in some terminals, the cursor can...

 
 

bug #51335: in some terminals, the cursor can be misplaced with --softwrap --nohelp --constantshow

Submitted by:  David Lawrence Ramsey <dolorous>
Submitted on:  Wed 28 Jun 2017 04:54:16 PM UTC  
 
Severity: 2 - MinorStatus: 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.

 

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

Fri 30 Jun 2017 08:33:06 AM UTC, comment #8:

Fixed in git, b93767b5. Thanks for reporting.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 29 Jun 2017 07:42:41 PM UTC, comment #7:

Yes, it does. Thanks.

David Lawrence Ramsey <dolorous>
Project Administrator
Thu 29 Jun 2017 07:32:12 PM UTC, comment #6:

Okay. Attached is more economical version of the patch: it avoids an extra wrefresh() call. Does this fix the issue too?

(file #41075)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 29 Jun 2017 06:27:55 PM UTC, comment #5:

Yes, it does fix the problem for both xfce-terminal and Konsole. And if the fix is that simple, I say go for it.

Normally, I use a terminal at 80x24 or larger; I only found this when trying to duplicate the softwrap bug you found in a 50-column screen. Still, I do have to shrink the terminal sometimes for whatever reason, so this will be useful then.

As for the options, constant cursor display, no help lines, and softwrap, add --morespace to those and you get maximum info combined with maximum screen real estate usage, even when you have to use a smaller terminal :)

David Lawrence Ramsey <dolorous>
Project Administrator
Thu 29 Jun 2017 06:10:06 PM UTC, comment #4:

The fix is easy enough: just do a cursor move and another screen update, just like at the end of bottombars(). See attached patch. Does this fix the problem also for your current Konsole?

But... there are very few people that use a terminal narrower than 80 columns and constant cursor display and no help lines and softwrap. I /think/ you might be the only one. :) If you used such a narrow terminal.

(file #41074)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 29 Jun 2017 04:24:39 PM UTC, comment #3:

Good to know. If it's fixed on more modern systems, it may not be worth the effort, unless the fix turns out to be incredibly simple and won't unnecessarily clutter things.

I didn't know you could run vte directly; thanks for the info. Also, turning on a blinking cursor in xfce-terminal (which is only available by manually editing a config file, as opposed to properly putting it in the settings GUI like Konsole) doesn't change what happens in the buggy versions, and neither does turning a blinking cursor off in Konsole.

For the record, Slackware-current has vte 0.44.3, which sounds like it's recent enough to avoid the problem. Also, there are packages to upgrade Slackware 14.2 or -current to KDE5 if one wanted to test KDE5's Konsole to see if it avoids the problem (except that the site I'd get the packages from seems to be down right now).

But the main reason I've so far stuck with Slackware 14.2 plus the terminals I've added is that I only have the one machine for development and everything else, and I'm a bit paranoid about potentially breaking it at the moment. The new vte needs a glib/gtk+ upgrade relative to Slackware 14.2 if I recall correctly; and KDE5 can't be installed alongside KDE4, but needs to replace it, and it isn't even in Slackware-current yet. Either option requires a lot of upgrading.

David Lawrence Ramsey <dolorous>
Project Administrator
Thu 29 Jun 2017 08:15:21 AM UTC, comment #2:

I've run the reproduction recipe

src/nano --ig --so --con --noh +16,1 doc/faq.html

on several distros, and these are the results:

Ubuntu Lucid libvte 0.23.5 affected
Elementary Luna libvte 0.32.1 affected
Linux Mint Sarah libvte 0.42.5 good
Manjaro (rolling) ...vte 0.48.3 good

(Lucid is from April 2010, Luna is based on Ubuntu Precise from April 2012, Sarah is based on Ubuntu Xenial from April 2016.)

I've also run the recipe on Salix (basically Slackware 14.2). It is also affected and it seems to have vte 0.28.2. Also when running vte directly (instead of through xfce4-terminal), the program is affected. But, when instead running vte-2.91 directly, the program is free from the cursor misplacement. So... maybe it isn't even a vte bug but a default misconfiguration?

Also, when using a 40-column terminal instead of a 50-column one, when the cursor is misplaced after an <End>, then toggling constantshow off and on doesn't put the cursor in the right place. This is because the toggle feedback also completely fills the bottom row of the screen, using also the last cell, pushing the cursor "offscreen".

What do you think? Do we need a workaround for the people who build nano on older machines, or on machines that have a KDE Konsole instead of a modern VTE-based Terminal?

(I wish I had an Ubuntu Trusty from 2014 somewhere. If that one already is okay, I would say: don't bother, people should upgrade. But if it is affected...)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 28 Jun 2017 04:56:49 PM UTC, comment #1:

Forgot one detail: since xfce-terminal is based on vte, the version of xfce-terminal that shows the bug is using vte 0.28.2.

David Lawrence Ramsey <dolorous>
Project Administrator
Wed 28 Jun 2017 04:54:16 PM UTC, original submission:

This can be reproduced with current git (c0a5237) as follows:

1. In a 50x24 terminal, in the src/ directory, run:

./nano --ignore --softwrap --const --nohelp +16,1 ../doc/faq.html

2. Press End. The cursor will be placed properly in terms of file location (the final space of " <a href="#1.4">1.4. What is the current version "), but will be misplaced in some terminals.

In xterm [X.Org 7.7.0(325)], rxvt [v2.7.10], rxvt-unicode [v9.22], and Eterm [0.9.6], the cursor is placed properly.

In xfce4-terminal [0.6.3 (Xfce 4.12)], the cursor will not be visible until you press Left or Right to move the cursor, or you press Ctrl-L to force a refresh.

In konsole [Qt: 4.8.7; KDE Development Platform: 4.14.32; Konsole: 2.14.2], the cursor will be placed at the beginning of the next line (and if the "Blinking cursor" option is activated via Settings -> Edit current profile -> Advanced, when the cursor is placed this way, it will not be blinking), until you press Left or Right to move the cursor, or you press Ctrl-L to force a refresh.

In the buggy cases, running the command in (1) without the --const option will not trigger the bug, and neither will running the command in (1) without the --nohelp option; both options are necessary.

David Lawrence Ramsey <dolorous>
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 #41075:  more-economical-version.patch added by bens (519B - text/x-patch)

 

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 dolorous (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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 22 Jul 2017 07:08:59 PM UTCbensOpen/ClosedOpen=>Closed
    Fri 30 Jun 2017 08:33:06 AM UTCbensSeverity3 - Normal=>2 - Minor
      StatusIn Progress=>Fixed
      Assigned toNone=>bens
      Summaryin some terminals, the cursor can be misplaced with --softwrap --constant --nohelp=>in some terminals, the cursor can be misplaced with --softwrap --nohelp --constantshow
    Thu 29 Jun 2017 07:32:12 PM UTCbensAttached File-=>Added more-economical-version.patch, #41075
    Thu 29 Jun 2017 06:10:06 PM UTCbensAttached File-=>Added defeat-another-VTE-KDE-bug.patch, #41074
      StatusNone=>In Progress
      Summaryin some terminals, the cursor can be misplaced with --softwrap --const --nohelp=>in some terminals, the cursor can be misplaced with --softwrap --constant --nohelp
    Thu 29 Jun 2017 08:15:21 AM UTCbensSummaryin some terminals. cursor can be misplaced with --softwrap, --const and --nohelp=>in some terminals, the cursor can be misplaced with --softwrap --const --nohelp

    Back to the top


    Powered by Savane 3.1-cleanup1