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

line-graphics don't behave too nice #527

Closed
Vampire opened this issue Sep 20, 2016 · 6 comments
Closed

line-graphics don't behave too nice #527

Vampire opened this issue Sep 20, 2016 · 6 comments
Labels
component:display Display management component:terminal Ncurses and terminal
Milestone

Comments

@Vampire
Copy link

Vampire commented Sep 20, 2016

  • When starting tig in ISO-8859-1 with LANG=en_US.ISO-8859-1 tig, the default and ascii line-graphics look good, but switching to utf-8 looks very ugly like

    â~W~Oâ~T~@â~U® Merge branch 'foo'
    â~W~O | f
    | â~W~O e
    â~W~O | d
    â~W~O | c
    | â~W~O b
    â~W~Nâ~T~@â~U¯ a
    

    Maybe it would be possible to prevent using utf-8 if locale is not utf-8?

  • When switching line-graphics in split view (having pressed return key on a commit in main view), the vertical ruler is not repainted until you select another line or un-split and resplit the view, no matter from or to which setting you switch

  • When starting tig in UTF-8 with LANG=en_US.UTF-8 tig, the ascii line-graphics look good, but switching to utf-8 or default looks very ugly.

    • Having utf-8, the commit graph graphics look very nice, but the vertical ruler looks ugly as it is still painted with ISO-8859-1 graphics. It looks like

      ●─╮ Merge branch 'foo'  ┬commit 29e1d57a71515ee69730e5a9d81caaf5d667165e
      ● │ f                    Refs: [master]
      │ ● e                    Merge: 49d16e6 393894b
      ● │ d                    Author:     Björn Kautler <foo>
      ● │ c                    AuthorDate: Tue Sep 20 13:31:05 2016 +0200
      │ ● b                    Commit:     Björn Kautler <foo>
      ◎─╯ a                    CommitDate: Tue Sep 20 13:31:05 2016 +0200
      
                           Merge branch 'foo'
      
                        b | 0
                        e | 0
                        2 files changed, 0 insertions(+), 0 deletions(-)
      
      
                                     ┬│
                                      ┬│
                                       ┬│
                                        ┬│
                                         ┬│
                                          ┬│
      
    • Having default, the commit graph graphics and the vertical ruler look ugly as they are painted with ISO-8859-1 graphics. It looks like

      MÄ¿ Merge branch 'foo'   ³commit 29e1d57a71515ee69730e5a9d81caaf5d667165e
      o ┬│┬│ f                   ┬│Refs: [master]
      │ oo e                    ┬│Merge: 49d16e6 393894b
      ┬││ d                    ┬│Author:     Björn Kautler <foo>
      ┬│ c                     ┬│AuthorDate: Tue Sep 20 13:31:05 2016 +0200
      │ o b                     ┬│Commit:     Björn Kautler <foo>
      -ÄÙa                    ³CommitDate: Tue Sep 20 13:31:05 2016 +0200
                           ┬│
                            ┬│    Merge branch 'foo'
                           ┬│
                            ┬│ b | 0
                           ┬│ e | 0
                           ┬│ 2 files changed, 0 insertions(+), 0 deletions(-)
                           ┬│
                            ┬│
                             ┬│
      

      It would be nice if utf-8 would be the default if started with UTF-8 and at most have a setting to switch to ISO-8859-1.

    • Also, using default does not repaint the screen properly.

      • If you switch from ugly default

        MÄ¿erge branch 'foo'
        o ┬│f
        ┬│ oe
        o ┬│d
        o ┬│c
        ┬│ ob
        I-ÄÙ
        

        to nice (if no vertical ruler is shown) utf-8, then there remain characters where they don't belong

        ●─╮┬┐erge branch 'foo'
        ● ││f
        │ ●oe
        ● ││d
        ● ││c
        │ ●ob
        ◎─╯ä├Ö
        

        until lines are repainted by switching view or selecting lines one after the other

      • Even if you only switch views while in default it keeps artifact characters.

        Main view

        MÄ¿erge branch 'foo'
        o ┬│f
        ┬│ oe
        o ┬│d
        o ┬│c
        ┬│ ob
        I-ÄÙ
        

        Pressing d

        commit 29e1d57a71515ee69730e5a9d81caaf5d667165e
        Refs: [master]
        Merge: 49d16e6 393894b
        Author:     Björn Kautler <foo>
        AuthorDate: Tue Sep 20 13:31:05 2016 +0200
        Commit:     Björn Kautler <foo>
        CommitDate: Tue Sep 20 13:31:05 2016 +0200
        
        Merge branch 'foo'
        
        b | 0
        e | 0
        2 files changed, 0 insertions(+), 0 deletions(-)
        

        Pressing m

        MÄ¿ Merge branch 'foo'
        o ┬│ f
        ┬│ o e
        o ┬│ d
        o ┬│ c
        ┬│ o b
        IÄÙ a
        
        Mer
        
        b | 0
        e | 0
        2 file
        
@Vampire
Copy link
Author

Vampire commented Sep 20, 2016

The vertical ruler that separates the line numbers from the remaining line suffers from the same issues than the split view vertical ruler.

@jonas jonas added component:display Display management component:terminal Ncurses and terminal labels Jul 10, 2017
@jonas jonas closed this as completed in 838f8b7 Jul 10, 2017
@jonas jonas added this to the tig-2.3 milestone Jul 10, 2017
@jonas
Copy link
Owner

jonas commented Jul 10, 2017

Thanks for the very detailed bug report. I fixed what I believe is the main issue, namely repainting the display when toggling line-graphics. I didn't find an easy way to skip the UTF-8 option if the terminal/environment does not support it. While this would be nice to have, I think it is mainly an inconvenience when trying out the options.

@xzxzzxzxzca
Copy link

xzxzzxzxzca commented Jul 23, 2019

I'm having a similar issue when I have LANG=en_DE.UTF-8 exported. Changing to en_US fixes it, but DE is what my desktop environment sets (and which is correct). Graphical symbols look scrambled like so:

~W~O ~T~@ ~T~B ~T~@ ~U
> tig --version
tig version 2.4.1
ncursesw version 6.1.20180317
readline version 7.0

@Vampire
Copy link
Author

Vampire commented Aug 9, 2019

@jonas I tested tig again now with 2.4.1 and as far as I can tell, nothing at all changed.
All things I reported are still happening like described. :-(

@technikhil314
Copy link

I am facing same issue. Any fixes or any duplicate of this?
tig version 2.5.1
ncursesw version 6.2.20200212

Screenshot from 2020-10-13 20-08-33

@kdheepak
Copy link

I'm also still experiencing this. Is there a fix for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:display Display management component:terminal Ncurses and terminal
Projects
None yet
Development

No branches or pull requests

5 participants