-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[WIP] Feature mintty tui #8271
[WIP] Feature mintty tui #8271
Conversation
src/nvim/os/cygterm.c
Outdated
// https://fossies.org/linux/vim/src/iscygpty.c | ||
// See https://github.com/BurntSushi/ripgrep/issues/94#issuecomment-261745480 | ||
// for an explanation on why this works | ||
int query_mintty(int fd, MinttyQueryType query_type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small note about style: functions in os/*
should be prefixed with os_
.
- Rename function. - Add Cygwindll struct. - Change function used only in cygterm.c to static function. - Fix that the termination process was not called. - Correct warning. - Fix lint issue. - Add comment.
Does |
Is there a terminfo file for "cygwin" ? |
I have > git --version
git version 2.15.0.windows.1 |
The cause of tcgetattr() returning __oldtermios was that API version of Cygwin was not set.
- Remove unnecessary definition. - Change not to expose to externally the inside of sturct CygTerm. - Move some definition to source file from header.
src/nvim/os/cygterm.h
Outdated
kNoneMintty, | ||
kMinttyCygwin, | ||
kMinttyMsys | ||
} MinttyType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why kNoneMintty
instead of kMinttyNone
?
@janlazo This PR is to work nvim on Mintty. I think that you would like to run the old-style test on the console(cmd.exe). Therefore, I think this PR is irrelevant. |
Check where ui_builtin_start is called from main.c . Edit: It happens after source_startup_scripts so init.vim should work to set TERMINFO. |
Can the patch to prevent abnormal termination because of |
sure, can someone cherry-pick it to a new PR? |
I have created a new pull request that only fix issue with TERM. @janlazo I think TUI display |
nvim TUI is usable on bash with the |
@janlazo try infocmp, it should show the terminfo file at the top of its output:
|
@justinmk I asked because I thought it's using a builtin-in terminfo.
|
@janlazo There's no builtin for cygwin (yet), see terminfo_builtin: neovim/src/nvim/tui/terminfo.c Line 105 in 6071637
|
@justinmk You used to say this before. @janlazo neovim looks for terminfo in
If terminfo is not found anywhere above, use builtin terminfo. In that case, since the builtin terminfo does not have cygwin, ansi_terminfo is used. |
|
@janlazo Did you check the steps mentioned here: #8315 (comment) |
ConEmu + bash is required for the TUI atm. Using bash on default Windows terminal doesn't display the cursor. See janlazo/dotvim8@1e2eea8 |
Oops, I didn't notice there is more than one log file.
|
Looking at this log, @janlazo If you add
Added
unset |
After appending |
No. I think that this PR is irrelevant. I can not imagine breaking the screen just by adding Could you show me the following results(nvimlog)?
And how about at I installed Window 10 on the Virtualbox and tried it. However, the cursor will not hide under any conditions. |
I have Windows 8.1 so I can't use Before adding it, the screen was normal with vertical cursor (ConEmu) or block cursor (cmd.exe). I can't highlight on ConEmu for some reason. |
I think you have failed to edit terminfo. I would like to sort out a problem. Is your problem as follows?
|
Yes for all 4 points. |
Information is too fragmented to reproduce everything in my environment. Are these problems caused by nvim applying this PR? Or are those problems going to happen in mintty? Otherwise, I think here is not very appropriate to continue discussion any furthrer. Would you be able to create a new issue if possible? |
@erw7 We could merge this without finishing the TODO list, if it improve things without breaking anything. Would be nice to make the changes to |
@justinmk I'm sorry I can't get time, and my reply is delayed. I am skeptical about merging this PR after reading https://sourceware.org/ml/cygwin/2014-11/msg00411.html. Also, I think that the function for calling |
This is an experimental implementation of mintty TUI which took over #7660.
After executeing, the state of the terminal does not return completely. Therefore drawing may be very slow. Please usereset
orstty
to restore the state of the terminal.tcgetattr()
returnsstruct __oldtermios
(This may be the cause of the terminal not returning completely to its original state).uv_write
fails to write to a pipe whennbufs>=2
.