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

Enable block cursor #202

Closed
osa1 opened this issue Oct 29, 2016 · 4 comments
Closed

Enable block cursor #202

osa1 opened this issue Oct 29, 2016 · 4 comments

Comments

@osa1
Copy link

osa1 commented Oct 29, 2016

As far as I understand neovim-qt ignores guicursor settings and uses a bar cursor in insert mode. It'd be great if existing guicursor settings worked, or alternatively, if neovim-qt provided its own settings for using block cursor.

@osa1
Copy link
Author

osa1 commented Nov 18, 2017

Any hope for this? Ping @equalsraf

I'm not happy with my terminal's (st) rendering speed. neovim-qt is much better, but the line cursor is making it unusable for me.

@osa1
Copy link
Author

osa1 commented Nov 18, 2017

diff --git a/src/gui/shell.cpp b/src/gui/shell.cpp
index 526ec5c..498fdd1 100644
--- a/src/gui/shell.cpp
+++ b/src/gui/shell.cpp
@@ -593,10 +593,7 @@ void Shell::paintEvent(QPaintEvent *ev)
 		bool wide = contents().constValue(m_cursor_pos.y(),
 						m_cursor_pos.x()).doubleWidth;
 		QRect cursorRect(neovimCursorTopLeft(), cellSize());
-
-		if (m_insertMode) {
-			cursorRect.setWidth(2);
-		} else if (wide) {
+        if (!m_insertMode && wide) {
 			cursorRect.setWidth(cursorRect.width()*2);
 		}
 		QPainter painter(this);

This fixes it for me.

@justinmk
Copy link
Contributor

Note that nvim 0.2 has mode_info_set UI event so guicursor option can be supported by UIs.

b-r-o-c-k added a commit to b-r-o-c-k/neovim-qt that referenced this issue Feb 27, 2019
The guicursor option can be used to change the cursor's color, blinking,
and shape.

Closes equalsraf#202, equalsraf#207, equalsraf#208
b-r-o-c-k added a commit to b-r-o-c-k/neovim-qt that referenced this issue Mar 24, 2019
The guicursor option can be used to change the cursor's color, blinking,
and shape.

Closes equalsraf#202, equalsraf#207, equalsraf#208
b-r-o-c-k added a commit to b-r-o-c-k/neovim-qt that referenced this issue Mar 24, 2019
The guicursor option can be used to change the cursor's color, blinking,
and shape.

Closes equalsraf#202, equalsraf#207, equalsraf#208
b-r-o-c-k added a commit to b-r-o-c-k/neovim-qt that referenced this issue Mar 24, 2019
The guicursor option can be used to change the cursor's color, blinking,
and shape.

Closes equalsraf#202, equalsraf#207, equalsraf#208
@jgehrig
Copy link
Collaborator

jgehrig commented Jul 31, 2020

The guicursor option is now supported as of Pull #520. It is available as of v0.2.16 and the only cursor in master.

blinking curosr

Marking as closed.

@jgehrig jgehrig closed this as completed Jul 31, 2020
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

No branches or pull requests

3 participants