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 · 2 comments

Comments

Projects
None yet
2 participants
@Vampire

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

This comment has been minimized.

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 closed this in 838f8b7 Jul 10, 2017

@jonas jonas added this to the tig-2.3 milestone Jul 10, 2017

@jonas

This comment has been minimized.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment