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

fish fails to determine konsole escape sequence length #1388

Closed
maxfl opened this issue Apr 1, 2014 · 8 comments
Closed

fish fails to determine konsole escape sequence length #1388

maxfl opened this issue Apr 1, 2014 · 8 comments
Labels
bug Something that's not working as intended

Comments

@maxfl
Copy link
Contributor

maxfl commented Apr 1, 2014

Tried on konsole and able to reproduce withtout vi_mode:

function fish_prompt
      #mutliline prompt
      echo a
      echo b\>
end
function ttt --on-variable fish_bind_mode
      # block cursor
      echo -en '\e]50;CursorShape=0\x7'
end

then start typing anything and type for a some time. On a some point the first prompt line becomes duplicated and everything moves one line down. Seems like fish misinterprets the length of the command printed. I guess this also causes the issue #1243.

@ridiculousfish ridiculousfish added this to the next-minor milestone Apr 2, 2014
@ridiculousfish
Copy link
Member

Not fixed after the fix for #1243. Not sure what's going on here - why would output in an event handler trigger a newline? Mysterious!

@ridiculousfish
Copy link
Member

Looks like we're calling s_reset from s_check_status, presumably because the escape sequence triggered a change in the modification time of the tty device.

@ridiculousfish
Copy link
Member

This is too risky to tackle for 2.2. Pushing out.

@faho
Copy link
Member

faho commented Jul 17, 2015

I can't reproduce this (archlinux, qt 5.5, konsole 15.04, fish 2.2.0).

@pickfire
Copy link
Contributor

I think I had experience similar issue. Do you mean this:

  1. Have a command that occupies 2 lines in your terminal.
  2. Add a - and press <TAB> trice to complete the command.
  3. Type a to search for the completion with a.
  4. Then press Ctrl+C.

Output: No prompt is shown.

2015-07-19-153918_564x340_scrot

@maxfl
Copy link
Contributor Author

maxfl commented Jul 20, 2015

Tried on 2.2.0, the problem still persists for me. I mean the problem, described in the original item for the fish vi-mode.

Steps to reproduce without vi-mode:

  1. Have a prompt that occupies two lines.
  2. Execute echo -en '\e]50;CursorShape=0\x7' to set cursor shape.
  3. Type any random letters. After about 50-100 characters the prompt and command line gets duplicated.

@maxfl
Copy link
Contributor Author

maxfl commented Jul 20, 2015

One can see a duplicated line here:
dup

@krader1961
Copy link
Contributor

There have been numerous changes in the past year relevant to this very old issue so I'm closing it. If someone can still reproduce please reopen or open a new issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended
Projects
None yet
Development

No branches or pull requests

5 participants