tbabej / vit

Placeholder to demostrate issue porting for VIT.
0 stars 0 forks source link

[VT-108] inside screen line background colours are only present where there's text #107

Closed tbabej closed 6 years ago

tbabej commented 6 years ago

PeterN on 2015-01-08T17:17:00Z says:

(I am new, apologies for mistakes)

This is request to re-open #VT-59.

I am using vit on a server within screen. I connect to the server via ssh from xterm. When vit is run within screen, background color is only drawn around characters and not continuously through the whole selected line.

Clearly, this has to do with setting $TERM. I fiddled with the thing and figured that the problem is that vit in init_shell_env rewrites $TERM to xterm-color256, while the correct setting I need is screen-256color. At the moment, the routine test whether vit runs in xterm OR screen and if so, sets $TERM to xterm-256color. The test should actually behave differently in screen (set screen-256color) and in xterm (set xterm-256color).

tbabej commented 6 years ago

Migrated metadata:

Created: 2015-01-08T17:17:00Z
Modified: 2015-03-02T00:48:38Z
tbabej commented 6 years ago

Scott Kostyshak on 2015-01-08T20:46:18Z says:

Hi Peter, and welcome!

Thank you very much for writing this report up.

I see two things that would be helpful, if you are up to the task:

  1. Can you post screenshots that would make the problem clearer to me? e.g. a "good" screenshot where VIT functions as it is supposed to (so I guess not through screen) and a "bad" screenshot where the only difference is the bug that you described.

  2. It sounds like you made good progress on nailing the problem down. Are you able/interested in posting a patch that fixes the problem?

I really appreciate the feedback.

tbabej commented 6 years ago

PeterN on 2015-01-08T22:30:35Z says:

vit run in normal xterm with 256 colors. Everything is correct as it should be.

tbabej commented 6 years ago

PeterN on 2015-01-08T22:31:09Z says:

vit when run inside screen.

tbabej commented 6 years ago

PeterN on 2015-01-08T22:33:22Z says:

Patch fixing the bug VT-108.

tbabej commented 6 years ago

PeterN on 2015-01-08T22:35:30Z says:

Hi Scott. Please find attached the requested screenshots and the patch. Note, I am not a perl coder, it's just an intuitive fix.

Peter.

tbabej commented 6 years ago

Scott Kostyshak on 2015-01-08T23:40:11Z says:

Great! The patch seems very sensible to me. A couple of notes on the patch, which I will fix. We probably want an "elsif" instead of the second "if" (this helps more for readability than efficiency). Also, we might be able to make it a little more elegant. We could have Perl store the match of the regex in a variable (so in this case that variable would equal either "xterm" or "screen") and just use that variable inside of one "if" statement. I will take a look at that.

I don't think anything else is needed from you. I just need some time for testing.

Thank you Peter

tbabej commented 6 years ago

Scott Kostyshak on 2015-03-02T00:47:59Z says:

The patch is in at 09e7acde (which will be part of 1.3). I did modify it to add an entry to the change log, improve the audit message, and implement the change in a more concise way (using the regex manipulation I discussed above).

Thanks for the help! You're now in the AUTHORS file.

tbabej commented 6 years ago

Scott Kostyshak on 2015-03-02T00:48:38Z says:

Fixed at 09e7acde.