Bug 328287 - Color information is not reset after vim exit using bash
Summary: Color information is not reset after vim exit using bash
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: emulation (show other bugs)
Version: master
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-01 15:55 UTC by Yichao Zhou
Modified: 2018-03-12 12:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 18.04


Attachments
screencast (1.75 MB, image/gif)
2013-12-03 15:22 UTC, Yichao Zhou
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yichao Zhou 2013-12-01 15:55:38 UTC
1.  $ vim  # open vim

2.  :color morning

3. :quit

4.  $ man man

You will find the first line of man page is "white". 

Screenshot:
http://i.imgur.com/SON90gd.png

Reproducible: Always
Comment 1 Kurt Hindenburg 2013-12-03 14:21:18 UTC
What profile/color scheme in Konsole are you using?  I checked a couple of  versions and I can't reproduce.
Comment 2 Yichao Zhou 2013-12-03 14:47:19 UTC
That's strange.  My konsole is version 2.11.3 under KDE 4.10.5.

The colorscheme in the screenshot is Linux.
Comment 3 Kurt Hindenburg 2013-12-03 14:50:22 UTC
It doesn't work w/ my default shell zsh.  If I change it to bash, I see the issue.
Comment 4 Yichao Zhou 2013-12-03 15:22:14 UTC
Created attachment 83904 [details]
screencast

I add a screencast to demonstrate the bug.  You may watch it to check if you do it right.  And it shows the options and version I use.
Comment 5 Yichao Zhou 2013-12-03 15:23:47 UTC
That's strange.  I'm using zsh too.
Comment 6 Boris Egorov 2015-07-23 03:11:43 UTC
I can reproduce it and saw it many times before. Reproducible both in bash and zsh. Also, I tried it in Terminator (reproduced) and in Gnome Terminal (not reproduced).

    OS: Debian Stretch

    $ konsole --version
    Qt: 5.4.2
    KDE Frameworks: 5.12.0
    Konsole: 3.91.0

    $ terminator --version
    terminator 0.97

    $ gnome-terminal --version
    GNOME Terminal 3.16.2

    $ vim --version
    VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 13 2015 05:48:06)
    Included patches: 1-712
Comment 7 Kurt Hindenburg 2018-03-12 12:04:26 UTC
This appears to happen only w/ certain drivers
--
 I have a system with an nvidia gfx, using the proprietary driver.
Comment 8 Kurt Hindenburg 2018-03-12 12:58:23 UTC
Git commit 7934bcff279b33e8ecb9f8c4ff0b4611af84dd34 by Kurt Hindenburg, on behalf of Ahmad Samir.
Committed on 12/03/2018 at 12:58.
Pushed by hindenburg into branch 'master'.

Reset rendition attributes to default when switching to alternate screen

Summary:
Call setDefaultRendition() before switching to the alternate screen

Quitting vim after using a color scheme which sets the character
background color doesn't clear that attribute in the alternate screen.
This affects other programs which use the alternate screen when run
right after quitting vim, e.g. less.

This issue appears to only happen with certain graphics cards/drivers.
FIXED-IN: 18.04

Reviewers: hindenburg, #konsole

Reviewed By: hindenburg, #konsole

Subscribers: #konsole

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D11246

M  +1    -0    src/Vt102Emulation.cpp

https://commits.kde.org/konsole/7934bcff279b33e8ecb9f8c4ff0b4611af84dd34