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/RFC] Windows TUI #6315

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@equalsraf
Contributor

equalsraf commented Mar 19, 2017

Enable the TUI for Windows. libuv's tty is used to get the console input, which is then passed to libtermkey. I've included a commit to enable the TUI, but we can also delay that for another PR

Main issues:

  • #6659 libtermkey is being downloaded from my repo, for the windows fixes
  • the cursor does not seem right, it always looks the same - I think libuv does not support cursor shapes, so we would need to address it upstream
  • #6660 :stop is broken, there is no implementation for suspend
  • #6661 closing the window in the close button displays a message about SIGHUP, takes a while to shut down too - is there a reason for SIGHUP shutdown to take a while?
  • Loading a colorscheme from init.vim does not produce the same outcome as doing later on - see #6315 (comment)
  • Some text colors/attributes do not look right, it does look consistent so maybe were are sending a sequence we should not, because the terminal does not support it
  • The Home/End keys do not work
  • Keys F1, F2, F3, F4, F5 input A,B,C,D respectively but F6-F12 work fine. pressing <C-V> + F1 also prints A
  • terminal content scrolling seems broken in some cases. e.g. nvim -u NONE works but with color=wombat256mod the terminal keeps pushing data up

@justinmk I suspect it will be hard for me to follow up with this for the next couple weeks. If anyone wants to take over this, they have my blessings. Whoever can provide some testing time it would be much appreciated too.

References

@equalsraf equalsraf referenced this pull request Mar 19, 2017

Closed

Windows console TUI #3902

@@ -775,26 +802,6 @@ static void unibi_goto(UI *ui, int row, int col)
unibi_out(ui, unibi_cursor_address);
}

static void unibi_out(UI *ui, int unibi_index)

This comment has been minimized.

@justinmk

justinmk Mar 19, 2017

Member

Why move this function?

This comment has been minimized.

@equalsraf

equalsraf Mar 19, 2017

Contributor

No reason, likely a result of rebasing a very old commit. I've cleaned up the patch.

@justinmk

This comment has been minimized.

Member

justinmk commented Mar 19, 2017

Thanks @equalsraf. Ideally we could upstream the libtermkey changes, is equalsraf/libtermkey@b9317d6 the only commit needed? cc @leonerd

@equalsraf

This comment has been minimized.

Contributor

equalsraf commented Mar 19, 2017

is equalsraf/libtermkey@b9317d6 the only commit needed?

Yes.

@justinmk justinmk added this to the 0.3 milestone Mar 19, 2017

@equalsraf equalsraf force-pushed the equalsraf:windows-tui branch from ef529e0 to 5301dd0 Mar 19, 2017

@equalsraf

This comment has been minimized.

Contributor

equalsraf commented Mar 19, 2017

(Windows 8) Some issues with colors schemes. Two instances of nvim with the color scheme wombat256. The right one loaded the colorscheme from init.vim. In the left one it was loaded manually after starting. Some other issues also affect scrolling on the right one too:

term

@justinmk

This comment has been minimized.

Member

justinmk commented Mar 19, 2017

Tried the appveyor artifact from this PR. Some rendering issues, but a great start. Enough to get some basic test coverage going... and to run on Windows "Nano" server :)

The background color can be "fixed" by hi Normal ctermbg=fg. Related: #4210

@equalsraf

This comment has been minimized.

Contributor

equalsraf commented Mar 24, 2017

Have not verified, but someone just reported that Home/End keys are not working at all (Windows 10, on ConEmu).

@equalsraf equalsraf force-pushed the equalsraf:windows-tui branch from 5301dd0 to 894a548 Apr 14, 2017

@janlazo

This comment has been minimized.

Contributor

janlazo commented Apr 22, 2017

How do I stop the buffer from scrolling up for :! commands? I have to use redraw! or similar to reset the buffer.

@justinmk

This comment has been minimized.

Member

justinmk commented Apr 22, 2017

@janlazo I think that's just a quirk we haven't fixed yet. This PR is just getting the ball rolling, help welcome.

@equalsraf equalsraf force-pushed the equalsraf:windows-tui branch from 894a548 to 6a75e73 Apr 23, 2017

@justinmk justinmk modified the milestones: 0.3, 0.2.1 May 1, 2017

@equalsraf equalsraf force-pushed the equalsraf:windows-tui branch from 6a75e73 to 0164de2 May 2, 2017

Windows Terminal UI
For CI builds unibilium is provided through msys2 packages, and
libtermkey is built from source in third-party from equalsraf/libtermkey.

In Windows we cannot read terminal input from the stdin file descriptor,
instead use libuv's uv_tty API. It should handle key input and encoding.

The UI suspend is not implemented for Windows, because the
SIGSTP/SIGCONT do not exist in windows. Currently this is a NOOP.
@justinmk

This comment has been minimized.

Member

justinmk commented May 3, 2017

Restarted the travis build, the failures were due to a cached version of the lua-client.

Let's merge this, it will help with troubleshooting bug reports on Windows by eliminating the GUI.

@equalsraf

This comment has been minimized.

Contributor

equalsraf commented May 3, 2017

@justinmk maybe move the libtermkey stuff into neovim/libtermkey first

@justinmk justinmk referenced this pull request May 3, 2017

Closed

win: tui: libtermkey fork #6659

justinmk added a commit that referenced this pull request May 3, 2017

win: Terminal UI #6315
For CI builds unibilium is provided through msys2 packages, and
libtermkey is built from source in third-party from equalsraf/libtermkey.

In Windows we cannot read terminal input from the stdin file descriptor,
instead use libuv's uv_tty API. It should handle key input and encoding.

The UI suspend is not implemented for Windows, because the
SIGSTP/SIGCONT do not exist in windows. Currently this is a NOOP.

Closes #3902
Closes #6640
@justinmk

This comment has been minimized.

Member

justinmk commented May 3, 2017

Merged. @equalsraf Well, we're downloading a binary so it doesn't really matter. We can fix it up in #6659

@justinmk justinmk closed this May 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment