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

Re: Display Bug in Leopard

Expand Messages
  • Tim Allen
    ... I m pretty sure we ve covered this before; this is our old friend Combining Characters. Specifically, I can reproduce the problem on Tiger in one step:
    Message 1 of 17 , Nov 1, 2007
      On Nov 1, 9:20 am, "björn" <bjorn.winck...@...> wrote:
      > On 30/10/2007, Niklas Lindström <lindstr...@...> wrote:
      > > Hm, for me the problem appears if you create the file (or folder) in
      > > the Finder.. Try to create a folder called "öl" with the Finder, then
      > > save a new file (e.g. "test") with Vim into that. ":cd" so you're not
      > > standing in this folder, and press CTRL-L to refresh..
      >
      > Still no dice...no display bugs for me. Can anybody else reproduce
      > this problems on Tiger (10.4). If yes, how did you do it?

      I'm pretty sure we've covered this before; this is our old friend
      Combining Characters.

      Specifically, I can reproduce the problem on Tiger in one step:

      mvim -u NONE -U NONE "+set laststatus=2" $(printf %b o\\0314\\0210)

      Note that the filename being generated is the UTF-8 sequence for an
      "o" followed by U+0308 COMBINING DIAERESIS in UTF-8 encoding. There
      are other ways of generating this byte sequence, but they don't all
      work across every shell.

      Interestingly, the status line is still there (the mouse cursor
      changes, you can drag it around and see the ~s increase or decrease in
      the empty buffer), it's just not drawn. If I cause a combining
      character to be drawn in the status line for other reasons, like so:

      mvim -u NONE -U NONE "+set laststatus=2" "+set statusline=$(printf %b o
      \\0314\\0210)"

      ...then only the first cell of the status line is blank - the rest of
      it is OK. If I put some normal characters before it:

      mvim -u NONE -U NONE "+set laststatus=2" "+set statusline=$(printf %b
      blorpo\\0314\\0210)"

      ...the entire status line is not drawn, again.


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • björn
      ... Thanks Tim for clarifying that. These problems I can reproduce and they are indeed because composing characters are unsupported. But Anmar s problem
      Message 2 of 17 , Nov 1, 2007
        On 01/11/2007, Tim Allen <thristian@...> wrote:
        >
        > On Nov 1, 9:20 am, "björn" <bjorn.winck...@...> wrote:
        > > On 30/10/2007, Niklas Lindström <lindstr...@...> wrote:
        > > > Hm, for me the problem appears if you create the file (or folder) in
        > > > the Finder.. Try to create a folder called "öl" with the Finder, then
        > > > save a new file (e.g. "test") with Vim into that. ":cd" so you're not
        > > > standing in this folder, and press CTRL-L to refresh..
        > >
        > > Still no dice...no display bugs for me. Can anybody else reproduce
        > > this problems on Tiger (10.4). If yes, how did you do it?
        >
        > I'm pretty sure we've covered this before; this is our old friend
        > Combining Characters.
        >
        > Specifically, I can reproduce the problem on Tiger in one step:
        >
        > mvim -u NONE -U NONE "+set laststatus=2" $(printf %b o\\0314\\0210)
        >
        > Note that the filename being generated is the UTF-8 sequence for an
        > "o" followed by U+0308 COMBINING DIAERESIS in UTF-8 encoding. There
        > are other ways of generating this byte sequence, but they don't all
        > work across every shell.
        >
        > Interestingly, the status line is still there (the mouse cursor
        > changes, you can drag it around and see the ~s increase or decrease in
        > the empty buffer), it's just not drawn. If I cause a combining
        > character to be drawn in the status line for other reasons, like so:
        >
        > mvim -u NONE -U NONE "+set laststatus=2" "+set statusline=$(printf %b o
        > \\0314\\0210)"
        >
        > ...then only the first cell of the status line is blank - the rest of
        > it is OK. If I put some normal characters before it:
        >
        > mvim -u NONE -U NONE "+set laststatus=2" "+set statusline=$(printf %b
        > blorpo\\0314\\0210)"
        >
        > ...the entire status line is not drawn, again.

        Thanks Tim for clarifying that. These problems I can reproduce and
        they are indeed because composing characters are unsupported. But
        Anmar's problem seems not to be related to this...maybe it is as
        George said that his patch causes those problems, but I can't test
        that since it seems to only affect Leopard.


        /Björn

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • anmar
        Hello George: How are you planning on addressing this. currently, I am turning off the spell as you type option. anmar On Oct 29, 2:25 pm, George Harker
        Message 3 of 17 , Nov 2, 2007
          Hello George:

          How are you planning on addressing this. currently, I am turning off
          the spell as you type option.

          anmar

          On Oct 29, 2:25 pm, "George Harker" <georgehar...@...>
          wrote:
          > That must be the baseline offset tweak I added. Perhaps that's the
          > wrong way to shift the underline to a reasonable distance under the
          > text. Anyone have any ideas on the right way to do it?
          >
          > Cheers
          >
          > George
          >
          > On 29/10/2007, anmar <situ...@...> wrote:
          >
          >
          >
          > > Hello Guys:
          >
          > > With spell as you type on, I get a really weird display of misspelled
          > > words. The funky thing is that they affect my status bar location.
          > > It is hard to explain in words so here is a screen shot <http://
          > > web.mac.com/anmar.oueja/Site/MacVIM_files/Picture%201.png>
          >
          > > anmar


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • georgeharker@googlemail.com
          This patch diff --git a/src/MacVim/MMTextStorage.m b/src/MacVim/MMTextStorage.m index 21bb518..088497b 100644 ... +++ b/src/MacVim/MMTextStorage.m @@ -238,7
          Message 4 of 17 , Nov 4, 2007
            This patch

            diff --git a/src/MacVim/MMTextStorage.m b/src/MacVim/MMTextStorage.m
            index 21bb518..088497b 100644
            --- a/src/MacVim/MMTextStorage.m
            +++ b/src/MacVim/MMTextStorage.m
            @@ -238,7 +238,7 @@
            bg, NSBackgroundColorAttributeName,
            fg, NSForegroundColorAttributeName,
            sp, NSUnderlineColorAttributeName,
            - [NSNumber numberWithFloat:
            2],NSBaselineOffsetAttributeName,
            +// [NSNumber numberWithFloat:
            2],NSBaselineOffsetAttributeName,
            nil];
            } else {
            attributes = [NSDictionary dictionaryWithObjectsAndKeys:


            Disables messing with the basline. I think Leopard APIs allow you to
            set the spelling style which was supported using the same keys on
            earlier oses, but with no docs / constants defined. I'll investigate.

            Cheers

            George


            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • nicolasweber@gmx.de
            ... The patch above fixes the display problem on Leopard. Here s the output of `:higlight` with and without the patch: http://amnoid.de/tmp/underline_now.png
            Message 5 of 17 , Nov 5, 2007
              > This patch
              >
              > diff --git a/src/MacVim/MMTextStorage.m b/src/MacVim/MMTextStorage.m
              > index 21bb518..088497b 100644
              > --- a/src/MacVim/MMTextStorage.m
              > +++ b/src/MacVim/MMTextStorage.m
              > @@ -238,7 +238,7 @@
              > bg, NSBackgroundColorAttributeName,
              > fg, NSForegroundColorAttributeName,
              > sp, NSUnderlineColorAttributeName,
              > - [NSNumber numberWithFloat:
              > 2],NSBaselineOffsetAttributeName,
              > +// [NSNumber numberWithFloat:
              > 2],NSBaselineOffsetAttributeName,
              > nil];
              > } else {
              > attributes = [NSDictionary dictionaryWithObjectsAndKeys:
              >
              > Disables messing with the basline. I think Leopard APIs allow you to
              > set the spelling style which was supported using the same keys on
              > earlier oses, but with no docs / constants defined. I'll investigate.

              The patch above fixes the display problem on Leopard. Here's the
              output of `:higlight` with and without the patch:

              http://amnoid.de/tmp/underline_now.png
              http://amnoid.de/tmp/underline_patched.png

              It also fixes the display problems with spell checking. I vote for
              including this patch until George is done investigating :-)

              Nico


              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • björn
              ... Done. I ve pushed a fix that disables changing the baseline for underlined text. /Björn --~--~---------~--~----~------------~-------~--~----~ You
              Message 6 of 17 , Nov 5, 2007
                On 05/11/2007, nicolasweber@... <nicolasweber@...> wrote:
                >
                > > This patch
                > >
                > > diff --git a/src/MacVim/MMTextStorage.m b/src/MacVim/MMTextStorage.m
                > > index 21bb518..088497b 100644
                > > --- a/src/MacVim/MMTextStorage.m
                > > +++ b/src/MacVim/MMTextStorage.m
                > > @@ -238,7 +238,7 @@
                > > bg, NSBackgroundColorAttributeName,
                > > fg, NSForegroundColorAttributeName,
                > > sp, NSUnderlineColorAttributeName,
                > > - [NSNumber numberWithFloat:
                > > 2],NSBaselineOffsetAttributeName,
                > > +// [NSNumber numberWithFloat:
                > > 2],NSBaselineOffsetAttributeName,
                > > nil];
                > > } else {
                > > attributes = [NSDictionary dictionaryWithObjectsAndKeys:
                > >
                > > Disables messing with the basline. I think Leopard APIs allow you to
                > > set the spelling style which was supported using the same keys on
                > > earlier oses, but with no docs / constants defined. I'll investigate.
                >
                > The patch above fixes the display problem on Leopard. Here's the
                > output of `:higlight` with and without the patch:
                >
                > http://amnoid.de/tmp/underline_now.png
                > http://amnoid.de/tmp/underline_patched.png
                >
                > It also fixes the display problems with spell checking. I vote for
                > including this patch until George is done investigating :-)

                Done. I've pushed a fix that disables changing the baseline for
                underlined text.

                /Björn

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_mac" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • George Harker
                Cool. Bizarrely under leopard, the basline offset doesn t really seem to be needed, whereas under tiger, the underline was way too tightly placed under the
                Message 7 of 17 , Nov 5, 2007
                  Cool. Bizarrely under leopard, the basline offset doesn't really seem
                  to be needed, whereas under tiger, the underline was way too tightly
                  placed under the text (making it hard to see).

                  Cheers

                  George

                  On 05/11/2007, bj�rn <bjorn.winckler@...> wrote:
                  >
                  > On 05/11/2007, nicolasweber@... <nicolasweber@...> wrote:
                  > >
                  > > > This patch
                  > > >
                  > > > diff --git a/src/MacVim/MMTextStorage.m b/src/MacVim/MMTextStorage.m
                  > > > index 21bb518..088497b 100644
                  > > > --- a/src/MacVim/MMTextStorage.m
                  > > > +++ b/src/MacVim/MMTextStorage.m
                  > > > @@ -238,7 +238,7 @@
                  > > > bg, NSBackgroundColorAttributeName,
                  > > > fg, NSForegroundColorAttributeName,
                  > > > sp, NSUnderlineColorAttributeName,
                  > > > - [NSNumber numberWithFloat:
                  > > > 2],NSBaselineOffsetAttributeName,
                  > > > +// [NSNumber numberWithFloat:
                  > > > 2],NSBaselineOffsetAttributeName,
                  > > > nil];
                  > > > } else {
                  > > > attributes = [NSDictionary dictionaryWithObjectsAndKeys:
                  > > >
                  > > > Disables messing with the basline. I think Leopard APIs allow you to
                  > > > set the spelling style which was supported using the same keys on
                  > > > earlier oses, but with no docs / constants defined. I'll investigate.
                  > >
                  > > The patch above fixes the display problem on Leopard. Here's the
                  > > output of `:higlight` with and without the patch:
                  > >
                  > > http://amnoid.de/tmp/underline_now.png
                  > > http://amnoid.de/tmp/underline_patched.png
                  > >
                  > > It also fixes the display problems with spell checking. I vote for
                  > > including this patch until George is done investigating :-)
                  >
                  > Done. I've pushed a fix that disables changing the baseline for
                  > underlined text.
                  >
                  > /Bj�rn
                  >
                  > >
                  >

                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_mac" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • waha
                  ... I m still seeing the same issue on unicode characters (In this case, Japanese), using the latest git clone. -- Richard Olsson
                  Message 8 of 17 , Nov 7, 2007
                    On Nov 5, 3:56 pm, "björn" <bjorn.winck...@...> wrote:
                    > Done. I've pushed a fix that disables changing the baseline for
                    > underlined text.

                    I'm still seeing the same issue on unicode characters (In this case,
                    Japanese), using the latest git clone.

                    --
                    Richard Olsson


                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_mac" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  • björn
                    ... There were (at least) two different issues here, so you ll have to be more specific about what problem you are having. You may want to pull from the Git
                    Message 9 of 17 , Nov 11, 2007
                      On 08/11/2007, waha <richard.olsson@...> wrote:
                      >
                      > On Nov 5, 3:56 pm, "björn" <bjorn.winck...@...> wrote:
                      > > Done. I've pushed a fix that disables changing the baseline for
                      > > underlined text.
                      >
                      > I'm still seeing the same issue on unicode characters (In this case,
                      > Japanese), using the latest git clone.

                      There were (at least) two different issues here, so you'll have to be
                      more specific about what problem you are having.

                      You may want to pull from the Git repo and try the new text renderer
                      (see my previous post).


                      /Björn

                      --~--~---------~--~----~------------~-------~--~----~
                      You received this message from the "vim_mac" maillist.
                      For more information, visit http://www.vim.org/maillist.php
                      -~----------~----~----~----~------~----~------~--~---
                    Your message has been successfully submitted and would be delivered to recipients shortly.