Bug 1390780 - resizing while a command is being executed breaks the display of commands entered in the future
Summary: resizing while a command is being executed breaks the display of commands ent...
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 24
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Siteshwar Vashisht
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2016-11-02 00:11 UTC by ben_redhat
Modified: 2017-08-08 19:05 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-08-08 19:05:36 UTC
Type: Bug

Attachments (Terms of Use)

Description ben_redhat 2016-11-02 00:11:59 UTC
Description of problem:
enlarging the terminal while a command is being executed breaks the display of commands entered in the future if they span more than the old linewidth.
Terminal behaves correctly after it is resized another time (without a command being executed).

Version-Release number of selected component (if applicable):
gnome terminal 3.20.2

How reproducible:

Steps to Reproduce:
1. open a gnome terminal
2. execute a command, e.g. 'sleep 10'
3. while the command is still beeing executed, resize (enlarge) the window
4. enter some text (enough to fill the line)

Actual results:
linefeed at the limit of the old window size, but no newline. the text entered thus overwrites the already written text. deleting characters becomes impossible.

Expected results:
linefeed & newline at the new line length. removing characters should still be possible.

Additional info:
this bug has existed for more than a year already - it is only now that I realized how to reproduce it though.

Comment 1 Christian Persch 2016-11-02 08:36:40 UTC
Not a gnome-terminal bug. You've simply not enabled the checkwinsize shell option.

Comment 2 ben_redhat 2016-11-02 11:20:03 UTC
I cannot believe that it can be desirable not to see what you are typing in the command line and not be able to remove the typed characters.
I would claim, that 
1. the checkwinsize option should be set to on per default as it is the behaviour that most people will expect
2. even with checkwinsize=off the linefeed and newline should happen simultaneously. It seems the linefeed (cursor moved to the left) happens at the old linewidth but the newline only at the new linewidth such that a new line is never started if the window size increased.

If the behaviour in 2. is actually desired I would really like to understand why - and especially why it should be the default behaviour. To me it seems to be too obscure to claim that people would expect this...

Also note, that the behaviour depends on whether a command is currently being executed. This as well seems to be a strange default behaviour in my eyes.

Comment 3 Egmont Koblinger 2016-11-02 20:35:33 UTC
(In reply to ben_redhat from comment #2)

> 1. the checkwinsize option should be set to on per default


I can't believe Red Hat / Fedora does not enable it. Ubuntu (and I guess Debian too) enables this from /etc/skel/.bashrc.

I've been using my bash with this option for about 15 years or even more, and never encountered a problem or side effect caused by this.

I'm clueless why it's not bash's default. In fact, I'm clueless why this option exists at all. One of the things I hate the most in the computer world is whenever a software has a configuration option "hey, do you want me to work correctly: yes or no?". This is one of them.

Comment 4 ben_redhat 2016-11-02 22:17:32 UTC
Apparently Fedora does this the same way. The custom .bashrc that I have installed a while back did not source either /etc/skel/.bashrc nor /etc/bashrc . This fixes it for me - but as I have already pointed out, I think that this is still a bug (and it is not the default behaviour of the shell itself but rather of the default bashrc?).

Fully agree with Egmont Koblingers last paragraph.

Comment 5 Egmont Koblinger 2016-11-02 22:48:50 UTC
See also my conclusion about skel (the bug itself is irrelevant) at https://bugzilla.gnome.org/show_bug.cgi?id=697475#c61 :)

Comment 6 Siteshwar Vashisht 2017-04-18 12:50:07 UTC
As pointed out in comment 4, default /etc/bashrc enables checkwinsize option for interactive shells, so expected behaviour works correctly in default installation. Since this option only applies to interactive shells, it does not make sense to enable it outside user's bashrc (for e.g. while compiling the shell). We have another bug that requests always sourcing /etc/bashrc that should avoid this issue in future. Please see https://bugzilla.redhat.com/show_bug.cgi?id=1193590#c18

Comment 7 Fedora End Of Life 2017-07-25 23:43:15 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 8 Fedora End Of Life 2017-08-08 19:05:36 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.