Skip to content
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

Add support for Neovim ext_cmdline #586

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

jgehrig
Copy link
Collaborator

@jgehrig jgehrig commented Sep 17, 2019

This is a first-pass at adding support for the Neovim ext_cmdline feature.

image

Outstanding Issues:

  • Test for Mac OS X.
  • Test for Windows.
  • Test For Linux
  • There are odd ... characters appended to the old cmdline area.
  • External popupmenu ext_popupmenu is not correctly displayed for nvim 0.4.0.

@jgehrig
Copy link
Collaborator Author

jgehrig commented Sep 17, 2019

I can't explain the ... characters being added to the bottom of the screenshot. Interestingly, nvim is explicitly sending events to paint these characters on the grid?

The behavior is dropped in nvim 0.4.0, so maybe we should do an API check to disable ext_cmdline for nvim < v0.4.0?

@jgehrig
Copy link
Collaborator Author

jgehrig commented Sep 17, 2019

image

Currently the ext_popupmenu integration is not well supported for v0.4.0. For earlier versions the TUI wildmenu is used. I will address this once we think the commanline is in a reasonable state.

@justinmk
Copy link
Contributor

Nice. This would be welcome for users who want top placement, or want the cmdline to overwite the statusline. I assume that will be configurable somehow?

@jgehrig
Copy link
Collaborator Author

jgehrig commented Sep 17, 2019

Nice. This would be welcome for users who want top placement, or want the cmdline to overwite the statusline. I assume that will be configurable somehow?

Currently it is pinned to the center of the screen, but I can look into a configuration scheme. Making it more configurable would be good...

I would also like something similar to the TUI look/feel too. I can see users wanting ext_messages, without relocating the cmdline.

@jgehrig
Copy link
Collaborator Author

jgehrig commented Sep 17, 2019

@justinmk Do you know anything about the ... behavior?

@Shatur
Copy link

Shatur commented Mar 26, 2020

Would be nice to have such feature. It's already implemented in gonvim.

@justinmk Do you know anything about the ... behavior?

Looks like dots exists in other clients too, for example in eovim

@jgehrig
Copy link
Collaborator Author

jgehrig commented Mar 26, 2020

Yes, I will loop back to this feature eventually. The GUI still needs work, and ext_popupmenu lacks a few options to make this work well.

Thanks, that means the ... behavior is almost certainly a client-side issue. We can set a minimum API version such that this issue does not appear.

@svermeulen
Copy link

I tried testing this on OSX since I see that is one of the TODOs listed here. After building neovim-qt from the branch here, the external command line does not show up. Is there something I need to do to enable it?

@jgehrig
Copy link
Collaborator Author

jgehrig commented Sep 18, 2020

@svermeulen

This PR still needs work... The cmdline functionality should be reasonable, but the widget needs work. It will have display issues.

You need to run :GuiCmdline 1 to enable the feature.

FIXME Below description is not accurate anymore

Adds a basic implementation of the external Neovim commandline. Utilizes basic
Qt Widgets (QLineEdit, QTextEdit) to display a floating command prompt.
@codecov-io
Copy link

codecov-io commented Feb 9, 2021

Codecov Report

Merging #586 (ccef100) into master (8e167e1) will increase coverage by 0.11%.
The diff coverage is 31.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #586      +/-   ##
==========================================
+ Coverage   21.18%   21.29%   +0.11%     
==========================================
  Files          72       78       +6     
  Lines       28143    28442     +299     
==========================================
+ Hits         5961     6058      +97     
- Misses      22182    22384     +202     
Impacted Files Coverage Δ
src/gui/cmdline/linemodel.cpp 0.00% <0.00%> (ø)
src/gui/cmdline/linemodel.h 0.00% <0.00%> (ø)
src/gui/shell.h 48.14% <ø> (ø)
src/gui/cmdline/extcmdlinewidget.cpp 28.03% <28.03%> (ø)
src/gui/shellwidget/shellwidget.cpp 51.96% <28.57%> (-0.30%) ⬇️
src/gui/cmdline/position.cpp 33.33% <33.33%> (ø)
src/gui/cmdline/blockdisplay.cpp 35.29% <35.29%> (ø)
src/gui/shell.cpp 44.31% <50.00%> (+0.18%) ⬆️
src/gui/shellwidget/shellwidget.h 70.00% <66.66%> (-5.00%) ⬇️
src/gui/cmdline/extcmdlinewidget.h 100.00% <100.00%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8e167e1...8a42641. Read the comment docs.

@craigmac
Copy link

craigmac commented Nov 6, 2023

@jgehrig with regards to the ... being printed out, this prompted a memory of a similar bug I encounted in Vim where this was happening, which I filed here: vim/vim#11501

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants