forked from neovim/neovim
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: regenerate #1
Open
github-actions
wants to merge
1
commit into
master
Choose a base branch
from
marvim/api-doc-update/master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kraftwerk28
pushed a commit
that referenced
this pull request
Jul 9, 2022
Problem ------- In neovim#19040, I reported two things that started happening somewhen in the last three months when using neovim in hterm (the Chrome Secure Shell terminal): 1. Under certain circumstances, the window title (set by nvim [i0]) would appear over the line I was typing, corrupting the screen. 2. If I changed my $TERM from xterm-256color to the new hterm-256color (available since ncurses >=20210320), the window title corruption was gone, but pane scrolling was broken. Both problems are due to changes in the termcap files, their source of truth being the ncurses project. See "Timeline of ncurses changes" below for details. Cause: title corruption ----------------------- The title corruption when using hterm + TERM=xterm-256color can be explained by event neovim#4 (ncurses 2022-03-12) in the ncurses timeline: The xterm-256color termcap file gained status line termcodes in ncurses 2022-03-12. These termcodes are used by Neovim to set the title when. hterm does not have a status line. Due to ncurses versions earlier than 2022-03-12 missing the xterm status line capability, Neovim manually fixed up [t0] the terminfo file if $TERM was xterm-256color. So if before Neovim manually added fsl/tsl capabilties, and after they were in the termcap file, why did hterm suddenly start getting corruption? The answer is that the termcodes for these capabilties are different when Neovim fixes them up, versus the one in the new termcap database: fsl=\E[0$} // from xterm-256color tsl=\E[2$~\E[1$}\E[%i%p1%d` // from xterm-256color fsl=\x07 // patched by Neovim tsl=\x1b]0; // patched by Neovim hterm ignores the latter, but corrupts the screen with the former. Solution: Make hterm users set hterm-256color, which lacks the new fsl/tsl codes. Also, to reduce superfluous work, stop patching in this capability when hterm is detected (even if hterm would ignore the patched version). Cause: pane corruption ---------------------- The pane corruption when using hterm + TERM=hterm-256color, but NOT when using hterm + TERM=xterm-256color can be explained by: - Neovim uses DECSLRM when available [p1] for performant scrolling. - Both the hterm-256color and xterm-256color termcap databases advertise support for DECSLRM (ncurses timeline #1, neovim#2 and neovim#3). - hterm does not support DESCLRM [p2] (note: it does support DESCTBM for top/bottom scrolling, but it's broken [p3] and not used by Neovim) - xterm-alikes that are not real xterm generally don't support DECSLRM either, so Neovim patches it out [p4]. When using hterm-256color, hterm is no longer considered an xterm-alike by Neovim. As a result, DECSLRM is not cleared. hterm does not support it, so corruption ensues. This is a problem with the hterm-256color termcap file, but we're stuck with it so the best we can do is patch over it. Timeline of ncurses changes --------------------------- 1. 2019-05-19: Part of the DECSLRM capability (smglr AKA set_lr_margin) added to vt420+lrmm, which xterm-256color inherits [n1] 2. 2021-03-20: hterm-256color added, inheriting xterm-256colors. [n2] 3. 2021-09-25: The *parm versions of smglr (AKA set_lr_margin) were added to vt420+lrmm [n3]. Namely: 1. smglp AKA set_left_margin_parm, and 2. smgrp AKA set_right_margin_parm 4. 2022-03-12: (new) codes for fsl, bsl and tsl added to xterm (add dec+sl to xterm-new, per patch neovim#371 -TD) [n4] Fixes neovim#19040. [i0]: https://github.com/neovim/neovim/blob/3a4fa22badc5595afc0a994ead965ff32ccf6c76/src/nvim/tui/tui.c#L1377 [t0]: https://github.com/neovim/neovim/blob/3a4fa22badc5595afc0a994ead965ff32ccf6c76/src/nvim/tui/tui.c#L1728,L1729 [p1]: https://github.com/neovim/neovim/blob/3a4fa22badc5595afc0a994ead965ff32ccf6c76/src/nvim/tui/tui.c#L1196 [p2]: https://bugs.chromium.org/p/chromium/issues/detail?id=1175065&q=component%3APlatform%3EApps%3EDefault%3EHterm [p3]: https://bugs.chromium.org/p/chromium/issues/detail?id=1298796&q=component%3APlatform%3EApps%3EDefault%3EHterm [p4]: https://github.com/neovim/neovim/blob/3a4fa22badc5595afc0a994ead965ff32ccf6c76/src/nvim/tui/tui.c#L1740-L1752 [n1]: mirror/ncurses@8f6d94b#diff-01544c577762d3308a1d232aa7afc79acf64b9a5057f88a004df82fda89549b7R2742 [n2]: mirror/ncurses@c265010#diff-01544c577762d3308a1d232aa7afc79acf64b9a5057f88a004df82fda89549b7R5907 [n3]: mirror/ncurses@f6b436c#diff-01544c577762d3308a1d232aa7afc79acf64b9a5057f88a004df82fda89549b7R2842 [n4]: mirror/ncurses@8bf8c83#diff-01544c577762d3308a1d232aa7afc79acf64b9a5057f88a004df82fda89549b7R4828 Signed-off-by: Nicolas Hillegeer <nicolas@hillegeer.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.