Loading ...
Sorry, an error occurred while loading the content.

Display messed up

Expand Messages
  • Marco
    Dear list, sometimes when I load vim, the display gets messed up. Messed up means it displays lines of the file in the wrong order. The displayed lines
    Message 1 of 7 , Jan 31, 2012
    • 0 Attachment
      Dear list,

      sometimes when I load vim, the display gets messed up.
      Messed up means it displays lines of the file in the wrong
      order. The displayed lines change when scrolling through
      the file (the actual file content stays the same). It does
      not happen with all files, but it is reproducible. It also
      depends on the font used. After changing the font size, a
      formerly “corrupt” displayed file displays correct and
      vice versa. A screenshot can be found here:

      http://i42.tinypic.com/23l84x.png

      A workaround is to resize the window. Then immediately the
      file is displayed correctly.

      Only vim is affected, gvim behaves normal. I tried
      different terminals (urxvt and xterm). Starting vim with
      -u NONE doesn't help, either. I tried vim version 7.3.363
      and 7.3.421.

      What happens here and how to solve this?

      Marco


      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Tim Chase
      ... My first suspicions are: possibly a corrupted font file, possibly a corrupted termcap database, or perhaps a bad memory chip (or some other hardware in
      Message 2 of 7 , Jan 31, 2012
      • 0 Attachment
        On 01/31/12 14:58, Marco wrote:
        > http://i42.tinypic.com/23l84x.png

        My first suspicions are: possibly a corrupted font file,
        possibly a corrupted termcap database, or perhaps a bad memory
        chip (or some other hardware in the picture).

        > A workaround is to resize the window. Then immediately the
        > file is displayed correctly.

        does using either ":redraw" or ":redraw!" also refresh the
        display correctly?

        > Only vim is affected, gvim behaves normal.

        So when you mentioned changing the font manifest the behavior,
        that was your terminal font, not 'guifont' in gvim, right?

        Do you have similar issues in other full-screen console
        applications when using the same "bad" font(s)? (could it be a
        corrupted font file?)

        What are these offending fonts named?

        Also, what is $TERM set to...both within Vim and outside Vim?
        Does the problem persist if you start vim with something like

        bash$ TERM=dummy vim file.txt

        to force a bogus termcap entry?

        Does this persist over a reboot? (if the Vim executable is
        getting cached in RAM and it's a bad chip, a reboot might
        allocate it at a different location)

        > I tried different terminals (urxvt and xterm). Starting vim
        > with -u NONE doesn't help, either. I tried vim version
        > 7.3.363 and 7.3.421.
        >
        > What happens here and how to solve this?

        This sounds crazy and is the first I've heard of such behavior.
        I don't know if the answers to any of my questions will lead
        anywhere, but hopefully they'll shed a little light on some of
        the areas that might be at issue.

        -tim






        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • Marco
        ... I can t tell you why, but I have the strong feeling that it s not a hardware issue. ... No, neither of the commands does. ... Yes, I m talking about the
        Message 3 of 7 , Jan 31, 2012
        • 0 Attachment
          On 2012-01-31 Tim Chase <vim@...> wrote:

          > On 01/31/12 14:58, Marco wrote:
          > > http://i42.tinypic.com/23l84x.png
          >
          > My first suspicions are: possibly a corrupted font file,
          > possibly a corrupted termcap database, or perhaps a bad
          > memory chip (or some other hardware in the picture).

          I can't tell you why, but I have the strong feeling that
          it's not a hardware issue.

          > > A workaround is to resize the window. Then immediately
          > > the file is displayed correctly.
          >
          > does using either ":redraw" or ":redraw!" also refresh
          > dthe isplay correctly?

          No, neither of the commands does.

          > So when you mentioned changing the font manifest the
          > behavior, that was your terminal font, not 'guifont' in
          > gvim, right?

          Yes, I'm talking about the terminal font. As I said gvim
          is not affected.

          > Do you have similar issues in other full-screen console
          > applications when using the same "bad" font(s)? (could
          > it be a corrupted font file?)

          No, only vim makes trouble. All other applications work
          fine.

          > What are these offending fonts named?

          Hmm… good question. My .Xresources file says:

          Rxvt.font: xft:Mono:pixelsize=13

          I'm not quite sure. fc-list outputs no font names “Mono”,
          but it could be FreeMono.ttf

          > Also, what is $TERM set to...both within Vim and outside
          > Vim? Does the problem persist if you start vim with
          > something like

          outside vim: TERM=rxvt-unicode
          inside vim: TERM=xterm-256color

          I also changed TERM to xterm-256color, without success.

          > bash$ TERM=dummy vim file.txt
          >
          > to force a bogus termcap entry?

          Yes, this helps. I did a few tests and it works fine.

          > Does this persist over a reboot? (if the Vim executable
          > is getting cached in RAM and it's a bad chip, a reboot
          > might allocate it at a different location)

          Yes, it's persistent.

          > I don't know if the answers to any of my questions will
          > lead anywhere, but hopefully they'll shed a little light
          > on some of the areas that might be at issue.

          I thank you a lot for your creative thoughts. As I
          mentioned, setting the TERM to “dummy” helps. But I have
          no idea why. Is this the solution of just a workaround
          that doesn't trigger the weird behaviour?

          Regards

          Marco


          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        • Tim Chase
          ... With the behavior changing based on $TERM, the possibility of a hardware issue no longer ranks high on my list of possible issues. ... Which backs the idea
          Message 4 of 7 , Jan 31, 2012
          • 0 Attachment
            On 01/31/12 16:27, Marco wrote:
            > On 2012-01-31 Tim Chase<vim@...> wrote:
            > I can't tell you why, but I have the strong feeling that
            > it's not a hardware issue.

            With the behavior changing based on $TERM, the possibility of a
            hardware issue no longer ranks high on my list of possible issues.

            >> does using either ":redraw" or ":redraw!" also refresh
            >> dthe isplay correctly?
            >
            > No, neither of the commands does.

            Which backs the idea that something is wrong with the termcap,
            that even as it redraws, it's using the improper escape settings.

            >> So when you mentioned changing the font manifest the
            >> behavior, that was your terminal font, not 'guifont' in
            >> gvim, right?
            >
            > Yes, I'm talking about the terminal font. As I said gvim
            > is not affected.

            I just wanted to make sure--the resizing-fixes aspect hinted that
            it might be (though not absolutely) gvim related. Terminals can
            send a WINCH signal which tells the application the window size
            changed, so the path Vim takes when processing this signal could
            also be at issue.

            > Hmm… good question. My .Xresources file says:
            >
            > Rxvt.font: xft:Mono:pixelsize=13

            Was that for the good font or the bad font? And is it only
            dependent on the font-name, or does it behave if you just change
            the font size?

            >> Also, what is $TERM set to...both within Vim and outside
            >> Vim? Does the problem persist if you start vim with
            >> something like
            >
            > outside vim: TERM=rxvt-unicode
            > inside vim: TERM=xterm-256color
            >
            > I also changed TERM to xterm-256color, without success.
            >
            >> bash$ TERM=dummy vim file.txt
            >>
            >> to force a bogus termcap entry?
            >
            > Yes, this helps. I did a few tests and it works fine.
            >
            > I thank you a lot for your creative thoughts. As I
            > mentioned, setting the TERM to “dummy” helps. But I have
            > no idea why. Is this the solution of just a workaround
            > that doesn't trigger the weird behaviour?

            Just to add to the pool of data, what does the output of :version
            have to say about "builtin_terms", "terminfo" and "termresponse"
            (and note there's a difference between "+" and "++" for some of
            those settings). It might also helpful to know the settings for
            various term-related settings:

            :set ttybuiltin? term? tenc?

            -tim




            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php
          • Marco
            ... I just did some more tests. The result: It occurs with different fonts and different font sizes. So, probably no font issue. ... ++builtin_terms
            Message 5 of 7 , Jan 31, 2012
            • 0 Attachment
              On 2012-01-31 Tim Chase <vim@...> wrote:

              > > Hmm… good question. My .Xresources file says:
              > >
              > > Rxvt.font: xft:Mono:pixelsize=13
              >
              > Was that for the good font or the bad font? And is it
              > only dependent on the font-name, or does it behave if
              > you just change the font size?

              I just did some more tests. The result: It occurs with
              different fonts and different font sizes. So, probably no
              font issue.

              > Just to add to the pool of data, what does the output of
              > :version have to say about "builtin_terms", "terminfo"
              > and "termresponse" (and note there's a difference
              > between "+" and "++" for some of those settings). It
              > might also helpful to know the settings for various
              > term-related settings:
              >
              > :set ttybuiltin? term? tenc?

              ++builtin_terms +terminfo +termresponse

              :set ttybuiltin? term? tenc?
              ttybuiltin
              term=rxvt-unicode
              termencoding=

              Hopefully this sheds some light on the source of the
              trouble. I have to admit that I'm no expert in those
              things, it had always worked for me.

              Marco


              --
              You received this message from the "vim_use" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php
            • Charles E Campbell Jr
              ... I suspect that your termcap/terminfo database entry may be incorrect. If your system is using terminfo (as opposed to termcap)... infocmp ${TERM} -- will
              Message 6 of 7 , Jan 31, 2012
              • 0 Attachment
                Marco wrote:
                > On 2012-01-31 Tim Chase<vim@...> wrote:
                >
                >
                >>> Hmm… good question. My .Xresources file says:
                >>>
                >>> Rxvt.font: xft:Mono:pixelsize=13
                >>>
                >> Was that for the good font or the bad font? And is it
                >> only dependent on the font-name, or does it behave if
                >> you just change the font size?
                >>
                > I just did some more tests. The result: It occurs with
                > different fonts and different font sizes. So, probably no
                > font issue.
                >
                >
                >> Just to add to the pool of data, what does the output of
                >> :version have to say about "builtin_terms", "terminfo"
                >> and "termresponse" (and note there's a difference
                >> between "+" and "++" for some of those settings). It
                >> might also helpful to know the settings for various
                >> term-related settings:
                >>
                >> :set ttybuiltin? term? tenc?
                >>
                > ++builtin_terms +terminfo +termresponse
                >
                > :set ttybuiltin? term? tenc?
                > ttybuiltin
                > term=rxvt-unicode
                > termencoding=
                >
                > Hopefully this sheds some light on the source of the
                > trouble. I have to admit that I'm no expert in those
                > things, it had always worked for me.
                >

                I suspect that your termcap/terminfo database entry may be incorrect.

                If your system is using terminfo (as opposed to termcap)...

                infocmp ${TERM} -- will display the terminal settings for your current
                $TERM . You may wish to save the output (ie. ... > ${TERM}.info)

                Then snoop on vim to see what its issuing:

                script snoopy
                vim somefile
                :q
                exit

                The "snoopy" file (pls be sure that you don't already have such a file
                before doing this). Check that the escape sequences work on your
                terminal as they're supposed to. I'm afraid you'll probably have to
                google the codes (probably looking for ansi escape sequences will help).

                Alternatively, see if you can find a terminfo entry for your ${TERM} via
                google and use infocmp to compare what you have vs what the internet
                version has.

                Good luck!
                Chip Campbell

                --
                You received this message from the "vim_use" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php
              • Marco
                ... Using your instructions I get two files with approximately 50 lines of codes, but I don t really have an idea how and what to check. I compared some
                Message 7 of 7 , Feb 1, 2012
                • 0 Attachment
                  On 2012-01-31 Charles E Campbell Jr <drchip@...> wrote:

                  > infocmp ${TERM} -- will display the terminal settings
                  > for your current $TERM . You may wish to save the output
                  > (ie. ... > ${TERM}.info) Then snoop on vim to see what
                  > its issuing:
                  >
                  > script snoopy
                  > vim somefile
                  > :q
                  > exit
                  >
                  > The "snoopy" file (pls be sure that you don't already
                  > have such a file before doing this). Check that the
                  > escape sequences work on your terminal as they're
                  > supposed to.

                  Using your instructions I get two files with approximately
                  50 lines of codes, but I don't really have an idea how and
                  what to check. I compared some sequences manually, they
                  were all equal. But for instance some sequences (e.g.
                  smso=\E[7m) are only found in the infocmp output.

                  > I'm afraid you'll probably have to google the codes
                  > (probably looking for ansi escape sequences will help).
                  >
                  > Alternatively, see if you can find a terminfo entry for
                  > your ${TERM} via google and use infocmp to compare what
                  > you have vs what the internet version has.

                  Thanks for the suggestions. I'll try to gather as much
                  information as possible.

                  Marco


                  --
                  You received this message from the "vim_use" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php
                Your message has been successfully submitted and would be delivered to recipients shortly.