Prezto: Cursor disappears with syntax-highlighting plugin in the embedded terminal of Jetbrain IDEs

Created on 26 Oct 2017  路  5Comments  路  Source: sorin-ionescu/prezto

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.

Most helpful comment

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

https://github.com/zsh-users/zsh-syntax-highlighting/issues/171

All 5 comments

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.

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..

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

https://github.com/zsh-users/zsh-syntax-highlighting/issues/171

Yes, that did work! :) 鉂わ笍

For others, my enabled highlighters:

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

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)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

EllieRagone picture EllieRagone  路  4Comments

adrian-amaglio picture adrian-amaglio  路  5Comments

jeffwidman picture jeffwidman  路  3Comments

ww7 picture ww7  路  4Comments

voanhduy1512 picture voanhduy1512  路  3Comments