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

Cursor disappears with syntax-highlighting plugin in the embedded terminal of Jetbrain IDEs #1497

Closed
wiesson opened this issue Oct 26, 2017 · 7 comments

Comments

@wiesson
Copy link

wiesson commented Oct 26, 2017

Description

A Jetbrains IDE offers an embedded terminal which I use quite often. If I enable syntax-highlighting and use the arrow keys to navigate, the cursor disappears and will only be visible when it blinks/flashes.

I don't know if this is an error of prezto (because it does work perfectly without the embedded terminal) or from Jetbrains - I guess Jetbrains.
I'm trying to find help to isolate the problem to raise an issue within the Jetbrains Bugtracker.

little gif

Steps to Reproduce

  1. Enable the syntax-highlighting plugin
  2. Start a Jetbrains IDE and open the embedded Terminal
  3. Use arrow keys to navigate

Versions

  • Prezto commit: latest
  • ZSH version: 5.3 (x86_64-apple-darwin17.0)
  • OS information: OSX 10.13

I also asked on Stackoverflow but anybody has replied yet.

@wiesson wiesson changed the title Cursor disappears with prezto with syntax-highlighting in the embedded terminal of Jetbrain IDEs Cursor disappears with syntax-highlighting plugin in the embedded terminal of Jetbrain IDEs Oct 26, 2017
@belak
Copy link
Collaborator

belak commented Nov 7, 2017

Do you have any configuration of this module in your zpreztorc? I've seen in a few other places that sometimes adding the "cursor" highlighter can cause issues like this.

@wiesson
Copy link
Author

wiesson commented Nov 7, 2017

I did not make any configuration besides uncommenting the available options like brackets, pattern (...). I also enabled a few modules like git and syntax-highlighting:

from .zpreztorc

zstyle ':prezto:load' pmodule \
  'environment' \
  'terminal' \
  'editor' \
  'history' \
  'directory' \
  'spectrum' \
  'utility' \
  'completion' \
  'git' \
  'syntax-highlighting' \ <--
  'prompt'

and within the # Syntax Highlighting config area:

zstyle ':prezto:module:syntax-highlighting' highlighters \
   'main' \
   'brackets' \
   'pattern' \
   'line' \
   'cursor' \
   'root'

That's it..

@belak
Copy link
Collaborator

belak commented Nov 8, 2017

Do you still see this issue if you disable the cursor highlighter? By default only the main highlighter is active... and I've seen a number of issues filed against the syntax highlighting module which seem similar to what you're seeing.

If you remove the 'cursor' \ line from the syntax highlighting config in your zpreztorc, this will disable the cursor highlighter and may fix this issue.

https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md

zsh-users/zsh-syntax-highlighting#171

@wiesson
Copy link
Author

wiesson commented Nov 9, 2017

Yes, that did work! :) ❤️

For others, my enabled highlighters:

zstyle ':prezto:module:syntax-highlighting' highlighters \
   'main' \
   'brackets' \
   'pattern' \
   'line' \
   'root'

@wiesson wiesson closed this as completed Nov 9, 2017
@dreamalligator
Copy link

dreamalligator commented Jan 26, 2019

I can confirm this worked for me too for the regular terminal emulator cursor.

lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.10
Release:	18.10
Codename:	cosmic
zsh --version
zsh 5.5.1 (x86_64-ubuntu-linux-gnu)

@fuatto
Copy link

fuatto commented Mar 16, 2021

the same for me when in 'vi' editor - command mode, the cursor disappears, and removing the 'cursor' \ line in highlighters works great!

@liberninja
Copy link

liberninja commented Oct 30, 2022

I had the same issue and wasn't able to resolve it by taking out the cursor syntax highlighting option.
I was only able to get my cursor back after I disabled zstyle ':prezto:*:*' color 'yes'

I'd prefer to have colors, but it's better than nothing. Not sure why that happens. I'm using xfce terminal btw.

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

5 participants