-
Notifications
You must be signed in to change notification settings - Fork 171
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
invisible cursor in term #145
Comments
Interesting it only happens in terminal mode, also only seems to happen when the cursor is not on top of anything else. Hypothesis: the terminal mode is explicitly drawing the cursor using the reverse attribute. But we draw our own cursor that inverts colors too. e.g. this patch "fixes" the cursor in terminal mode by disabling the drawing of the cursor. diff --git a/src/gui/shell.cpp b/src/gui/shell.cpp
index c445129..7cfe47d 100644
--- a/src/gui/shell.cpp
+++ b/src/gui/shell.cpp
@@ -534,7 +534,7 @@ void Shell::paintEvent(QPaintEvent *ev)
}
QPainter painter(this);
painter.setCompositionMode(QPainter::RasterOp_SourceXorDestination);
- painter.fillRect(cursorRect, m_cursor_color);
+// painter.fillRect(cursorRect, m_cursor_color);
}
} its not that the cursor is not there it just so happens the cursor is drawn by reversing the colors and the reverse color is the same as the background - for e.g. try testing with the colorscheme TLDR we need a better strategy to draw the cursor, or a way to avoid drawing the cursor in :term |
@equalsraf If I apply this, I get the cursor back in terminal. However, I loose it in normal mode :( |
I can get around invisible terminal cursor through setting the following: let g:terminal_color_7 = '#FBBC05' The above is dark yellow and when the inverse is taken a dark blue cursor is displayed in the terminal. |
Closing this issue, since I can't reproduce the bug. |
Since commit 11a6dcc, the cursor in neovim terminal is not visible.
Example of neovim term in commit 11a6dcc:
Example of neovim term in precedent commit 63a9f16:
Cheers and thanks for your awesome work !
The text was updated successfully, but these errors were encountered: