Skip to content

Rendering issue using history and fish_right_prompt #2224

Closed

Description

@TimWolla

I have got a rendering issue using Ubuntu 15.04 with Unity and the default gnome terminal using a bleeding edge fish (fish, version 2.2.0-56-g9cf2bb1): I am using a fish_right_prompt showing the current time. When I execute a command that spans multiple lines and press the up arrow to execute it again the last character of my fish_prompt is missing and the line is rendering one character to the left, while the cursor operates on the real positon. Pressing Ctrl+A to jump to the start of the line and adding a character fixes the rendering issue.

See the attached gif as an example. That was me entering the example echo that spans multiple lines. After pressing up you can see the the right bracket of my prompt is missing. The second time I add a space and remove it again after pressing “up”, which fixes the rendering.
bug

Activity

  1. faho commented on Jul 18, 2015

    @faho
    Member

    I can't reproduce this (on archlinux). Can you upload your prompts?

  2. TimWolla commented on Jul 18, 2015

    @TimWolla
    Author

    fish_right_prompt:

    function fish_right_prompt
        date +"%H:%M:%S"
    end
    

    fish_prompt (not my real one, but I can reproduce the issue with that).

    function fish_prompt --description 'Prompt anzeigen'
        echo -n "Prompt:"
    end
    
  3. faho commented on Jul 18, 2015

    @faho
    Member

    Nope, I'm afraid I still can't reproduce, neither with konsole nor gnome terminal.

    I'll try further.

  4. TimWolla commented on Jul 18, 2015

    @TimWolla
    Author

    If it helps: The issue (similarly) also happens when I type a command and autocomplete it by pressing control + F (I did nothing but type echo and then Ctrl+F):
    bug

  5. faho commented on Jul 18, 2015

    @faho
    Member

    Interesting: in that case the last character you entered is missing, in the other it's the last character of the prompt.

    I still can't reproduce and can't find a commit that matches g9cf2bb1 - my git build is at 2.2.0-55-g97edc96 (though I can't find a g97edc96 either). Can you post which commit you built from?

  6. TimWolla commented on Jul 18, 2015

    @TimWolla
    Author

    I still can't reproduce and can't find a commit that matches g9cf2bb1 - my git build is at 2.2.0-55-g97edc96 (though I can't find a g97edc96 either). Can you post which commit you built from?

    I am using a PPA: deb http://ppa.launchpad.net/fish-shell/nightly-master/ubuntu vivid main. Note that g is not part of the commit hash. It stands for git. The commit is 9cf2bb1.

  7. added this to the milestone on Jul 19, 2015
  8. max-m commented on Sep 18, 2015

    @max-m

    I can reproduce the issue on my local Ubuntu 15.04 (fish, version 2.2.0-270-gb13ee9d), and remotely (via SSH) on Ubuntu 14.04.3 LTS (fish, version 2.2.0), CentOS release 6.7 (fish, version 2.2.0-274-gbe70ea7) and Debian 8.2 (fish, version 2.2.0).
    Tested terminals were GNOME-Terminal 3.14.2 and XTerm(312).

  9. TimWolla commented on Sep 18, 2015

    @TimWolla
    Author

    I just bisected fish, the first bad commit is 2813dcc

    [timwolla@/d/w/c/fish-shell ((2813dcc...)|BISECTING)]g bisect bad       04:04:10
    2813dcc6cc756f20548b4cfadfa2facd6c126f22 is the first bad commit
    commit 2813dcc6cc756f20548b4cfadfa2facd6c126f22
    Author: d10n <[email protected]>
    Date:   Sun Nov 17 07:49:48 2013 -0500
    
        On short prompts, commands wider than the terminal do not reposition to start on their own lines.
    
    :100644 100644 d02fc438a5d5ca9a4daa041bc72940f8a149a3a3 fdf462e2b1019a9f50c2a7058dfa86c9322b63ba M  screen.cpp
    

    and

    [timwolla@/d/w/c/fish-shell ((2813dcc...)|BISECTING)]g bisect log                                                                                                                                            04:06:06
    git bisect start
    # bad: [be70ea7d49af3cf5bb09116bc278d994fd0cd00c] Add completion for Arch's mkinitcpio
    git bisect bad be70ea7d49af3cf5bb09116bc278d994fd0cd00c
    # good: [3c5d5b344ee945b99e4bb16a44af6f293601813d] Fix for buffer overflows identified by libgmalloc
    git bisect good 3c5d5b344ee945b99e4bb16a44af6f293601813d
    # bad: [d6c5a1e0c48ea7d95693fcbaace1800e5d3b16a1] Merge branch 'master' into documentation-update
    git bisect bad d6c5a1e0c48ea7d95693fcbaace1800e5d3b16a1
    # bad: [74135c0600d5dcc40d396d0e7293c17b8d4bdaa7] Merge pull request #1317 from pullreq/cpp
    git bisect bad 74135c0600d5dcc40d396d0e7293c17b8d4bdaa7
    # skip: [358145c4bd10f04766ca296d89388e3b93474b5c] Merge branch 'master' into ast
    git bisect skip 358145c4bd10f04766ca296d89388e3b93474b5c
    # skip: [1863be7be43d18e5e24c2684df86d764ddb089cc] Fix some warnings
    git bisect skip 1863be7be43d18e5e24c2684df86d764ddb089cc
    # bad: [ef4465efdb07c27d4da3482e8ffc99c2a6ed18d4] More work on builtin pager
    git bisect bad ef4465efdb07c27d4da3482e8ffc99c2a6ed18d4
    # skip: [c0ad54fe02d0631beeafd5208866dc52146e94a2] Allow reading manpages by using F1.
    git bisect skip c0ad54fe02d0631beeafd5208866dc52146e94a2
    # good: [fd25a6425c7bafff2746b5c349e7313b0110c041] Fix two memory leaks.
    git bisect good fd25a6425c7bafff2746b5c349e7313b0110c041
    # good: [90b78326d393d2490e43491a93d8db4b449b972e] Cast timestamp before using it for formatted string.
    git bisect good 90b78326d393d2490e43491a93d8db4b449b972e
    # bad: [51214177256be1127d793cbc1b40aec04d6856d8] Fix for annoying error message when converting out of range escape https://github.com/fish-shell/fish-shell/issues/1107
    git bisect bad 51214177256be1127d793cbc1b40aec04d6856d8
    # good: [63a15e232bd598cbba6bfe2c1a5b16ba0d923235] Fix indentation in __fish_complete_cd
    git bisect good 63a15e232bd598cbba6bfe2c1a5b16ba0d923235
    # bad: [ded64758d5972aca8c599278cd13d98b4b02906e] Fix wide character wrapping.
    git bisect bad ded64758d5972aca8c599278cd13d98b4b02906e
    # good: [0a54558ee24f2375266bf6c3c33a12602b344e5b] Update brew completion with new options
    git bisect good 0a54558ee24f2375266bf6c3c33a12602b344e5b
    # bad: [2813dcc6cc756f20548b4cfadfa2facd6c126f22] On short prompts, commands wider than the terminal do not reposition to start on their own lines.
    git bisect bad 2813dcc6cc756f20548b4cfadfa2facd6c126f22
    # first bad commit: [2813dcc6cc756f20548b4cfadfa2facd6c126f22] On short prompts, commands wider than the terminal do not reposition to start on their own lines.
    
  10. TimWolla commented on Mar 3, 2016

    @TimWolla
    Author

    Any update, maybe?

  11. max-m commented on Mar 4, 2016

    @max-m

    I can’t reproduce this bug with GNOME Terminal 3.16.2 whereas XTerm(318) still shows the described behavior for me.

    Edit: Tested fish versions:

    • fish, version 2.2.0-667-g333415f
    • fish, version 2.2.0
  12. krader1961 commented on Mar 22, 2016

    @krader1961
    Contributor

    I can't reproduce this on OS X using iTerm2 or xterm(320) with fish built from git head as I type this. I don't see any reason this needs to delay releasing fish 2.3.0, assuming the problem still exists, so I'm bumping this back to the next-2.x milestone.

  13. added
    bug
    on Aug 3, 2016
  14. TimWolla commented on Aug 30, 2016

    @TimWolla
    Author

    This seems to be fixed for me. You may close this issue now, if you want.

    result

  15. faho commented on Aug 30, 2016

    @faho
    Member

    Okay.

  16. locked as resolved and limited conversation to collaborators on Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions