Opened 12 years ago
Closed 12 years ago
#9293 closed enhancement (fixed)
Some Terminal enhancements
Reported by: | Ziusudra | Owned by: | siarzhuk |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/Terminal | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
These fix most of the issues that I described over at HaikuPorts.
Patch 0001 adds a haiku termcap entry that accurately describes Terminal's current capabilities. This would fix #6424. (Issues such as #3164 and #6510 will probably be made worse unless the haiku termcap entry is installed on the remote or TERM is changed.)
Patch 0002 updates the master termcap.src. It also disables warnings in our ncurses.a; this is temporary. I'll be looking at better use of that termcap.src after the holidays.
Patch 0003 is just a style cleanup of TermParse.cpp.
Patch 0004 adds comments describing Terminal's terminfo/termcap capabilities.
Patch 0005 implements the other ACS characters that DejaVu has glyphs for.
Patch 0006 makes SGR codes 39 & 49 actually reset the color as IS_FORESET
& IS_BACKSET
are never used. Are they left over from something that got removed, or are they something that didn't get finished?
Patch 0007 fixes a bug I noticed while testing where SIGWINCH was not getting updated when the terminal size was changed by the Settings->Window size
menu.
Patch 0008 just removes a few lines of duplicated code in TermView::AttachedToWindow
.
Patch 0009 removes the SIGWINCH message, runner, handler and flag as they weren't used/needed.
There are still things I'm looking into. The already mentioned termcap.src, a terminfo entry (maybe eventually upstreamed to ncurses), cursor visibility, updating (or maybe removing) the in trunk ncurses, and maybe back color erase.
Attachments (11)
Change History (19)
by , 12 years ago
Attachment: | 0001-Add-a-Haiku-termcap-entry.patch added |
---|
follow-up: 2 comment:1 by , 12 years ago
patch: | 0 → 1 |
---|
by , 12 years ago
Attachment: | 0002-Update-master-termcap-and-silence-ncurses-warnings.patch added |
---|
by , 12 years ago
Attachment: | 0003-Style-cleanup-no-functional-change-intended.patch added |
---|
by , 12 years ago
Attachment: | 0004-Added-comments-documenting-terminfo-termcap-capabili.patch added |
---|
by , 12 years ago
Attachment: | 0005-Added-other-ACS-characters-for-which-the-DejaVu-font.patch added |
---|
by , 12 years ago
Attachment: | 0006-Made-SGR-39-49-actually-reset-the-the-color.patch added |
---|
by , 12 years ago
Attachment: | 0007-Update-SIGWINCH-when-setting-terminal-size.patch added |
---|
by , 12 years ago
Attachment: | 0008-Fixed-a-bit-of-code-duplication.patch added |
---|
by , 12 years ago
Attachment: | 0009-Removed-unused-message-and-runner-and-related-code.patch added |
---|
comment:2 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
follow-up: 4 comment:3 by , 12 years ago
Standard? What standard? There is no standard.
xterm? The "xterm" in the termcap currently in trunk does not match the terminfo that comes with a full ncurses install (or the one in the new termcap).
I'll attach a file showing the differences in Terminal and the terminfo xterm capabilities. There's a lot of work to do.
Nothing stops the user from changing their TERM variable. But not having a Haiku termcap prevents them from being able to set TERM something that isn't going to cause issues of some sort.
If Terminal ever gets to the point that it can do everything some other termcap/terminfo entry can do then we can get rid of the haiku termcap.
Until then there's really nothing to lose by having it and we gain the ability to have programs behave as expected.
by , 12 years ago
Attachment: | haiku-xterm-diff added |
---|
Shows the differences between Terminal and xterm capabilities
comment:4 by , 12 years ago
Replying to Ziusudra:
Standard? What standard? There is no standard.
xterm? The "xterm" in the termcap currently in trunk does not match the terminfo that comes with a full ncurses install (or the one in the new termcap).
Yes, the termcap should be synchronized with most actual and most widely used at the moment version. That is was I meant as "standard".
I'll attach a file showing the differences in Terminal and the terminfo xterm capabilities. There's a lot of work to do.
Unfortunately, thti is the only right way, in my opinion. :-|
comment:5 by , 12 years ago
Oh, absolutely, that is the way to go. It is going to take work and time. Until then having termcap and ncurses programs behave more correctly is possible.
Another benefit of maintaining a haiku termcap/terminfo entry is that that makes it easy to compare with xterm one and see what still needs to be done.
by , 12 years ago
Attachment: | 0010-Implemented-SGR-codes-for-setting-colors-8-15.patch added |
---|
This is something xterm does and includes in it's (recent) terminfo/termcap entry.
comment:6 by , 12 years ago
Added another patch.
Also, I did Patch 2 wrong, should have used tic -aCrTtx
with the T
option to prevent tic from limiting the size of the entries.
comment:7 by , 12 years ago
Replying to Ziusudra:
Patch 0001 adds a haiku termcap entry that accurately describes Terminal's current capabilities.
I have rejected it. Terminal must be improved (see hrev45364 for example) to mimic xterm-256color more accurately instead of introducing another bit of Chaos in This World. ;-)
Patch 0002 updates the master termcap.src. It also disables warnings in our ncurses.a;
hrev45364 do something like this. Thank you for for some hints I have used improving my version of termcap.src.
Patch 0003 is just a style cleanup of TermParse.cpp.
obsoleted by hrev45364. Cleanup was performed on top of those changes anyway.
Patch 0004 adds comments describing Terminal's terminfo/termcap capabilities.
I hope we switch to terminfo soon, so there no need to overload code with such info, IMO.
Patch 0005 implements the other ACS characters that DejaVu has glyphs for.
Partially applied in hrev45367. Thank you for the contribution!
Patch 0006 makes SGR codes 39 & 49 actually reset the color as
IS_FORESET
&IS_BACKSET
are never used. Are they left over from something that got removed, or are they something that didn't get finished?
Obsoleted by hrev45364.
Patch 0008 just removes a few lines of duplicated code in
TermView::AttachedToWindow
.
Applied in hrev45367. Thank you for the contribution!
Patch 0007 fixes a bug I noticed while testing where SIGWINCH was not getting updated when the terminal size was changed by the
Settings->Window size
menu. Patch 0009 removes the SIGWINCH message, runner, handler and flag as they weren't used/needed.
I'm investigating the SIGWINCH handling now. IMO replacing BMessageRunner-driven handler with direct call of corresponding handler is not equal and not safe. It
changes the processing context and may have unpleasant side-effects and regressions.
Thank you for your work anyway!
comment:8 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The SIGWINCH problem you have pointed is fixed in hrev45379. Thank you.
Replying to Ziusudra:
Thank you for this batch of changes!
In the early days of Haiku we have already "beterm" termcap entry inherited from BeOS. I suspect nobody will happy switching back to something non-standard. Our intention is to bring the Terminal to support standard capabilites instead of adjusting environment to it's imprefections. But anyway I found your investigations very usefull!