Bug 443637 - [rseterminal] rendering troubles: lines not appearing
Summary: [rseterminal] rendering troubles: lines not appearing
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: terminal (show other bugs)
Version: Next   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-09 14:19 EDT by Samuel Suther CLA
Modified: 2020-09-04 15:12 EDT (History)
3 users (show)

See Also:


Attachments
Logfile (11.47 KB, text/x-log)
2014-09-13 15:59 EDT, Samuel Suther CLA
no flags Details
ANSI_Logfile (8.87 KB, text/x-log)
2014-09-30 09:19 EDT, Samuel Suther CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Suther CLA 2014-09-09 14:19:04 EDT
First of all, I had some trouble if I start nano on the server and move with the Cursor.

In this case, cursor seems to jump arround, and lines are not repaintet.

I fix this with executing : export TERM="xterm-color" on the Server.

Now if I'm open nano on Server all looks pretty well, and moving arround with cursor works like a charm... ... BUT, there is still a Problem:

If I edit the File (for example add a linebreak), the srceen is not repainted.

I've found a workarround... I press CTRL+L, then the screen reload.
But anyway... this sucks. No chance to really work with this Bug!

See the video to got better understanding what I mean:

http://youtu.be/Uw6rO_SN090?hd=1
Comment 1 Martin Oberhuber CLA 2014-09-10 05:55:33 EDT
The terminal only understands the ANSI standard, so please try this:

export TERM=ansi

In case this still doesn't help, we'd need to collect logs of the terminal interaction to understand what control codes your remote sends. To enable logging, simply create a directory

   /tmp/eclipselogs               # on Linux/UNIX
   C:\eclipselogs                 # on Windows

and then try to reproduce the issue. A file /tmp/eclipselogs/tmterminal.log will be created that logs your interaction. Review the interaction and attach on bugzilla for investigation. See also the code here:

https://git.eclipse.org/c/tm/org.eclipse.tm.git/tree/terminal/plugins/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/Logger.java
Comment 2 Samuel Suther CLA 2014-09-13 15:59:41 EDT
Created attachment 247038 [details]
Logfile

Before I had the ANSI Standard.
It works much better after I set xterm-color. But nevertheless, it works not fully.

Oh. and here the Logfile...
I have open crontab -e and do a Linebreak. After this I've Press CTRL+L to refresh.
Comment 3 Martin Oberhuber CLA 2014-09-14 19:06:49 EDT
Looking at your log, it is clear why the repaint doesn't work. After you pressed ENTER (13 sent), this is received and the terminal explains what it doesn't understand:

LoggingOutputStream.write:27: Received 53 bytes: '\x1b[15;24r\x1b[15;1H\x1bM\x1b[1;27r\x1b[1;159H\x1b[7mModified\r\x1b[15B\x1b[m'
VT100Emulator.processNewText:267: entered
VT100Emulator.processAnsiCommandCharacter:539: Ignoring unsupported ANSI command character: 'r'
VT100Emulator.processNewText:359: Unsupported escape sequence: escape 'M'

The ESC[15;24r and ESC M are not valid ANSI escape sequences as per
http://en.wikipedia.org/wiki/ANSI_escape_code

According to http://www.xfree86.org/current/ctlseqs.html it looks like they should be interpreted as follows by xterm:

CSI P s ; P s r
Set Scrolling Region [top;bottom] (default = full size of window) (DECSTBM)
ESC M
Reverse Index ( RI is 0x8d)

Nobody has implemented the "set scrolling region" for the terminal so far, and I can't tell how hard it would be to implement. I would suggest that you try 
   export TERM=ansi
collect the logs of what 'nano' does with that setting on your system and attach here. I suspect that adding any missing escape sequences in ANSI mode might be easier than trying to achieve xterm compatibility for you.

I would be open to receiving code contributions that improve the Terminal's range of supported escape sequences for making it more compatible. Code to change is found here:
https://git.eclipse.org/c/tm/org.eclipse.tm.git/tree/terminal/plugins/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100Emulator.java
Comment 4 Martin Oberhuber CLA 2014-09-14 19:16:13 EDT
And BTW, the RI - Reverse Index function is explained here for the vt100:
http://www.vt100.net/docs/vt100-ug/chapter3.html
Comment 5 Michael Scharf CLA 2014-09-15 08:47:09 EDT
I think many programs have problems with TETM=ansi. I always thought that the emulation 'ansi' == 'vt100'. The ansi emulation may be enough for something like readline, but for most text editors seem to misinterpret ansi as something like vt100.

Maybe the terminal should implement the VT100 escape sequences:

   http://ascii-table.com/ansi-escape-sequences-vt-100.php
(this is the last reference in the wikipedia documentation)

CSI P s ; P s r
   Set top and bottom lines of a window
ESC M
   Move/scroll window up one line
ESC D
   Move/scroll window down one line

The terminal backend implementation supports region scrolling:

 https://git.eclipse.org/c/tm/org.eclipse.tm.git/tree/terminal/plugins/org.eclipse.tm.terminal/src/org/eclipse/tm/terminal/model/ITerminalTextData.java#n124

However, the VT100 emulator implementation does not use this...
Comment 6 Samuel Suther CLA 2014-09-30 09:11:23 EDT
K, thank you for your response.
Your answers a bit overloaded for me to understand them. 

What to do now?
I should switch back to ANSI-Enviroment on server, edit a script with nano and send the output of the eclipse-log here?
Comment 7 Samuel Suther CLA 2014-09-30 09:19:46 EDT
Created attachment 247487 [details]
ANSI_Logfile

This log is created with TERM=ansi.

I've opend a file with nano add a linebreak, press CTRL+L and close without saving.
Comment 8 Jonah Graham CLA 2020-05-01 10:08:35 EDT
The Terminal component of the Eclipse Ecosystem has a new home. The Terminal is now part of the Eclipse CDT project[1].

This change means a new Git repo[2], P2 site[3] and Bugzilla component. The terminal will continue to be delivered as part of the quarterly Simultaneous Release of Eclipse as well.

The marketplace entry[4] had not been updated in a few years. It will once again install the latest release of the terminal on the latest release of the whole IDE (currently 2020-03).

If this bug is no longer relevant, please feel free to comment or close the bug. If you can confirm if this issues still occurs in the latest release please do let me know in a comment.

[1] https://wiki.eclipse.org/CDT/User/NewIn911
[2] https://git.eclipse.org/c/cdt/org.eclipse.cdt.git (in the terminal directory)
[3] current release is 9.11 - P2 site https://download.eclipse.org/tools/cdt/releases/9.11/
[4] https://marketplace.eclipse.org/content/tm-terminal

(This comment was added to all open terminal bugs along with changing the Product/component pair to CDT/terminal.)