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

Re: Problem with spell highlighting in gvim 7.0aa on Mac OS 10.3.9 and 10.4.2

Expand Messages
  • Chris Allen
    ... More generally, underlining and italics do not work for Vim 7 under OS X s native GUI. You can temporarily resolve the highlighting issue by changing your
    Message 1 of 16 , Oct 9, 2005
      On 09/10/05, Lukas Muehlethaler <lukas.muehlethaler@...> wrote:
      > I compiled Vim 7.0aa (CVS Oct 4) on Mac OS 10.3.9 and 10.4.2, both with
      > GUI (Carbon) and without. The spellcheck feature works in both versions
      > (']s', 'z?', etc.), but only the non-GUI version (in Terminal.app)
      > highlights misspelled words---the GUI version doesn't.

      More generally, underlining and italics do not work for Vim 7 under OS
      X's native GUI. You can temporarily resolve the highlighting issue by
      changing your highlighting settings to something which does not use
      undercurl, underline or italics.

      Regards,
      Chris Allen
    • Bram Moolenaar
      ... The Mac GUI doesn t support the undercurl yet (curly underlining). I hope someone who know how to draw pixels can implement this. Examples can be found
      Message 2 of 16 , Oct 9, 2005
        Lukas Muehlethaler wrote:

        > I compiled Vim 7.0aa (CVS Oct 4) on Mac OS 10.3.9 and 10.4.2, both with
        > GUI (Carbon) and without. The spellcheck feature works in both versions
        > (']s', 'z?', etc.), but only the non-GUI version (in Terminal.app)
        > highlights misspelled words---the GUI version doesn't. By the way, I
        > enabled the +syntax feature at compile time and removed .vim and .gvim
        > just in case...

        The Mac GUI doesn't support the undercurl yet (curly underlining). I
        hope someone who know how to draw pixels can implement this. Examples
        can be found in the GTK and Win32 files: gui_gtk_x11.c function
        draw_under() and gui_w32.c gui_mch_draw_string().

        --
        "You're fired." (1980)
        "You're laid off." (1985)
        "You're downsized." (1990)
        "You're rightsized." (1992)
        (Scott Adams - The Dilbert principle)

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
        \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
      • Lukas Muehlethaler
        Dear Bram, dear Chris, thank you very much for your help! With the colorscheme inkpot and guifont=Courier:h12 the following works (in .gvimrc): hi SpellBad
        Message 3 of 16 , Oct 9, 2005
          Dear Bram, dear Chris,

          thank you very much for your help! With the colorscheme inkpot and
          guifont=Courier:h12 the following works (in .gvimrc):

          hi SpellBad guifg=Magenta (or any other color)
          hi SpellCap guifg=Red
          hi SpellRare guifg=Yellow
          hi SpellLocal guifg=Blue

          Alternatively:

          hi SpellBad gui=standout guifg=Magenta
          hi SpellCap gui=standout guifg=Red
          hi SpellRare gui=standout guifg=Yellow
          hi SpellLocal gui=standout guifg=Blue

          I am sure somebody has a better solution that works for most
          colorschemes!


          On Oct 9, 2005, at 12:20 PM, Bram Moolenaar wrote:

          >
          > Lukas Muehlethaler wrote:
          >
          >> I compiled Vim 7.0aa (CVS Oct 4) on Mac OS 10.3.9 and 10.4.2, both
          >> with
          >> GUI (Carbon) and without. The spellcheck feature works in both
          >> versions
          >> (']s', 'z?', etc.), but only the non-GUI version (in Terminal.app)
          >> highlights misspelled words---the GUI version doesn't. By the way, I
          >> enabled the +syntax feature at compile time and removed .vim and .gvim
          >> just in case...
          >
          > The Mac GUI doesn't support the undercurl yet (curly underlining). I
          > hope someone who know how to draw pixels can implement this. Examples
          > can be found in the GTK and Win32 files: gui_gtk_x11.c function
          > draw_under() and gui_w32.c gui_mch_draw_string().
          >
          > --
          > "You're fired." (1980)
          > "You're laid off." (1985)
          > "You're downsized." (1990)
          > "You're rightsized." (1992)
          > (Scott Adams - The Dilbert principle)
          >
          > /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net
          > \\\
          > /// Sponsor Vim, vote for features --
          > http://www.Vim.org/sponsor/ \\\
          > \\\ Project leader for A-A-P -- http://www.A-A-P.org
          > ///
          > \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html
          > ///
          >
        • Jussi Hagman
          ... I have a provisional patch ripped quite directly from gui_gtk_x11.c for this. The undercurl works with both ATSU and QT text. At the moment there seems to
          Message 4 of 16 , Oct 23, 2005
            On 9.10.2005, at 19:20, Bram Moolenaar wrote:
            >
            > The Mac GUI doesn't support the undercurl yet (curly underlining). I
            > hope someone who know how to draw pixels can implement this.

            I have a provisional patch ripped quite directly from gui_gtk_x11.c
            for this. The undercurl works with both ATSU and QT text. At the
            moment there seems to be some cosmetic issues on the mac.

            How do you want the patch? Is cvs diff sufficient or should I get
            unaltered tree and make manual diff on it?

            What changes are needed in the autotools front if the macintosh gui
            would be split in separate OS X and pre-OS X files? At the moment the
            source is quite hard to read because of the intermixing of ATSUI, non-
            ATSUI, Carbon and pre-Carbon code.

            In a related note I seem not to get ATSUI text working properly on
            vim7 on Tiger. Does it work ok for other mac users?

            Greetings,
            Jussi


            --
            Jussi Hagman, jhagman@..., iChat/AIM: jussihagman, ICQ: 54004113
            Studentbyn 4 D 33, 20540 Åbo, Finland +358 50 56 51 170
          • Chris Allen
            ... Ah, interesting. Apple Type Services for Unicode Imaging -- that is probably the problem I have (on 10.3) where underlining and bold do not work when
            Message 5 of 16 , Oct 24, 2005
              On 24/10/05, Jussi Hagman <jhagman@...> wrote:
              > In a related note I seem not to get ATSUI text working properly on
              > vim7 on Tiger. Does it work ok for other mac users?

              Ah, interesting. Apple Type Services for Unicode Imaging -- that is
              probably the problem I have (on 10.3) where underlining and bold do
              not work when compiled with +multibyte. I had previously just assumed
              that underlining and bold did not work at all using the OS X GUI (why
              anyone would compile without multibyte in this day and age is a
              mystery to me), but when you suggested an ATSUI problem I did a build
              without multibyte and found underlining and bold worked again.

              Thanks,
              Chris Allen
            • Jussi Hagman
              ... Well, that must be the reason then. :( I would guess with some fiddling with the code you can use multibyte with the QuickDraw textrendering, but it too
              Message 6 of 16 , Oct 24, 2005
                On 24.10.2005, at 13:47, Chris Allen wrote:

                > On 24/10/05, Jussi Hagman <jhagman@...> wrote:
                >
                > Ah, interesting. Apple Type Services for Unicode Imaging -- that is
                > probably the problem I have (on 10.3) where underlining and bold do
                > not work when compiled with +multibyte. I had previously just assumed
                > that underlining and bold did not work at all using the OS X GUI

                Well, that must be the reason then. :(

                I would guess with some fiddling with the code you can use multibyte
                with the QuickDraw textrendering, but it too could have some issues.
                I have provisional simple patches for undercurl and italic which I'll
                post soon. The italic patch works just with the QuickDraw rendering..

                Does the ATSUI rendering produce anti-aliased text on vim7 on 10.3?
                On 10.4 I get only jagged glyphs.

                Greetings,
                Jussi

                --
                Jussi Hagman, jhagman@..., iChat/AIM: jussihagman, ICQ: 54004113
                Studentbyn 4 D 33, 20540 Åbo, Finland +358 50 56 51 170
              • Chris Allen
                ... Yes, it is very disappointing. I generally use console Vim on OS X just because it is so much better than the GUI. Sadly, the OS X Terminal.app shipped
                Message 7 of 16 , Oct 25, 2005
                  On 24/10/05, Jussi Hagman <jhagman@...> wrote:
                  > Well, that must be the reason then. :(

                  Yes, it is very disappointing. I generally use console Vim on OS X
                  just because it is so much better than the GUI. Sadly, the OS X
                  Terminal.app shipped with 10.3 is fairly buggy, too! Using xterm is
                  just too much work on OS X, since the integration just isn't there.
                  Ah well.

                  > I would guess with some fiddling with the code you can use multibyte
                  > with the QuickDraw textrendering, but it too could have some issues.
                  > I have provisional simple patches for undercurl and italic which I'll
                  > post soon. The italic patch works just with the QuickDraw rendering..

                  I would have thought that with some fiddling the underlining and
                  italics could probably be made to work with ATSUI. I suspect it is
                  just an implementation issue, but I haven't got time to look right
                  now. I'm not at all familiar with the Apple libraries, so it would
                  take me ages to do anything productive, even if I had time.

                  > Does the ATSUI rendering produce anti-aliased text on vim7 on 10.3?
                  > On 10.4 I get only jagged glyphs.

                  It does not. I won't complain, though, at the font size I use. If I
                  increase the font size on this machine to something where antialiasing
                  wouldn't just blur the issue I get a load of minor, but irritating
                  drawing bugs.

                  Thanks,
                  Chris Allen
                • Jussi Hagman
                  ... You re totally right. Vim on OS X is no joyride at the moment. The GUI version is broken in various ways and the terminal on OS X is quite bad too, it
                  Message 8 of 16 , Oct 25, 2005
                    On 25.10.2005, at 13:08, Chris Allen wrote:

                    > On 24/10/05, Jussi Hagman <jhagman@...> wrote:
                    >
                    >> Well, that must be the reason then. :(
                    >>
                    >
                    > Yes, it is very disappointing. I generally use console Vim on OS X
                    > just because it is so much better than the GUI. Sadly, the OS X
                    > Terminal.app shipped with 10.3 is fairly buggy, too! Using xterm is
                    > just too much work on OS X, since the integration just isn't there.

                    You're totally right. Vim on OS X is no joyride at the moment. The
                    GUI version is broken in various ways and the terminal on OS X is
                    quite bad too, it still is on 10.4...

                    I was going to use my summer holiday on fixing Vim but I was very
                    unproductive and lazy. I hope I'll get some patches done now and I
                    hope there would be new people, in addition to the old timers, who
                    would find it an interesting project to work on.


                    >> I would guess with some fiddling with the code you can use multibyte
                    >> with the QuickDraw textrendering, but it too could have some issues.
                    >> I have provisional simple patches for undercurl and italic which I'll
                    >> post soon. The italic patch works just with the QuickDraw rendering..
                    >>
                    >
                    > I would have thought that with some fiddling the underlining and
                    > italics could probably be made to work with ATSUI. I suspect it is
                    > just an implementation issue, but I haven't got time to look right
                    > now.

                    Sure it can be done and I'll try to take a look into it when I have
                    more time. But switching to QuickDraw rendering is the quick fix if
                    that is needed.

                    > It does not. I won't complain, though, at the font size I use. If I
                    > increase the font size on this machine to something where antialiasing
                    > wouldn't just blur the issue I get a load of minor, but irritating
                    > drawing bugs.

                    OK. Thanks for the information.

                    Greetings,
                    Jussi

                    --
                    Jussi Hagman, jhagman@..., iChat/AIM: jussihagman, ICQ: 54004113
                    Studentbyn 4 D 33, 20540 Åbo, Finland +358 50 56 51 170
                  • Chris Allen
                    ... Indeed. I think it would probably benefit from being broken up into pre- and post-OS X files, but that view is based only on casual inspection while
                    Message 9 of 16 , Oct 25, 2005
                      On 25/10/05, Jussi Hagman <jhagman@...> wrote:
                      > You're totally right. Vim on OS X is no joyride at the moment. The
                      > GUI version is broken in various ways

                      Indeed. I think it would probably benefit from being broken up into
                      pre- and post-OS X files, but that view is based only on casual
                      inspection while chasing down bugs.

                      > and the terminal on OS X is quite bad too, it still is on 10.4...

                      I'm sorry to hear that, I was hoping it would be better when I finally
                      got around to upgrading.

                      > I was going to use my summer holiday on fixing Vim but I was very
                      > unproductive and lazy. I hope I'll get some patches done now and I
                      > hope there would be new people, in addition to the old timers, who
                      > would find it an interesting project to work on.

                      I wouldn't mind helping, since I think Vim deserves to shine
                      everywhere, but I haven't got the time just at the moment. I am
                      hoping that I will at some point, but my student years full of free
                      time are well behind me ;)

                      > OK. Thanks for the information.

                      No problem, thank you for taking an interest in the problem!

                      Chris Allen
                    • Marvin Humphrey
                      ... I m using one of the 6.3 binaries on OS X 10.4, and it s buggy but usable. I use the GUI version, as it has two advantages over the terminal version that
                      Message 10 of 16 , Oct 25, 2005
                        On Oct 25, 2005, at 8:01 AM, Jussi Hagman wrote:

                        > Vim on OS X is no joyride at the moment. The GUI version is broken
                        > in various ways and the terminal on OS X is quite bad too, it still
                        > is on 10.4...

                        I'm using one of the 6.3 binaries on OS X 10.4, and it's buggy but
                        usable. I use the GUI version, as it has two advantages over the
                        terminal version that I'd rather not live without:

                        * I don't have to ":se nosmartindent" every time I want
                        to paste something from the external clipboard.
                        * Syntax coloring is SO much better.

                        From a satisfied customer,

                        Marvin Humphrey
                        Rectangular Research
                        http://www.rectangular.com/
                      • Bram Moolenaar
                        [Sorry for the delay in replying, I have been on a trip to Uganda and I m still catching up with e-mail.] ... Any kind of context diff will do. ... Can we drop
                        Message 11 of 16 , Nov 21, 2005
                          [Sorry for the delay in replying, I have been on a trip to Uganda and
                          I'm still catching up with e-mail.]

                          Jussi Hagman wrote:

                          > On 9.10.2005, at 19:20, Bram Moolenaar wrote:
                          > >
                          > > The Mac GUI doesn't support the undercurl yet (curly underlining). I
                          > > hope someone who know how to draw pixels can implement this.
                          >
                          > I have a provisional patch ripped quite directly from gui_gtk_x11.c
                          > for this. The undercurl works with both ATSU and QT text. At the
                          > moment there seems to be some cosmetic issues on the mac.
                          >
                          > How do you want the patch? Is cvs diff sufficient or should I get
                          > unaltered tree and make manual diff on it?

                          Any kind of context diff will do.

                          > What changes are needed in the autotools front if the macintosh gui
                          > would be split in separate OS X and pre-OS X files? At the moment the
                          >
                          > source is quite hard to read because of the intermixing of ATSUI, non-
                          > ATSUI, Carbon and pre-Carbon code.

                          Can we drop the pre-OS X support in Vim 7? That would make things
                          simpler. People who run OS 9 can probably keep using Vim 6.4.

                          > In a related note I seem not to get ATSUI text working properly on
                          > vim7 on Tiger. Does it work ok for other mac users?

                          It works for me, but not always. There are problems with utf-8 text
                          and/or composing characters.

                          --
                          hundred-and-one symptoms of being an internet addict:
                          121. You ask for e-mail adresses instead of telephone numbers.

                          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                          /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                          \\\ download, build and distribute -- http://www.A-A-P.org ///
                          \\\ help me help AIDS victims -- http://www.ICCF.nl ///
                        • Jussi Hagman
                          ... OK, here it is at last. It implements the undercurl independently of the text drawing mode. I took a contextual cvs diff against the newest CVS so I hope
                          Message 12 of 16 , Nov 25, 2005
                            On 21.11.2005, at 23:06, Bram Moolenaar wrote:

                            >
                            > Jussi Hagman wrote:
                            >
                            >>
                            >> How do you want the patch? Is cvs diff sufficient or should I get
                            >> unaltered tree and make manual diff on it?
                            >
                            > Any kind of context diff will do.

                            OK, here it is at last. It implements the undercurl independently of
                            the text drawing mode. I took a contextual cvs diff against the
                            newest CVS so I hope it is a good one.

                            Greetings,
                            Jussi
                          • Jussi Hagman
                            ... Apparently the attachment did not survive the elements of Internet... Here is the patch again: RCS file: /cvsroot/vim/vim7/src/gui_mac.c,v retrieving
                            Message 13 of 16 , Nov 25, 2005
                              On 25.11.2005, at 21:27, Jussi Hagman wrote:
                              >
                              > OK, here it is at last. It implements the undercurl independently
                              > of the text drawing mode. I took a contextual cvs diff against the
                              > newest CVS so I hope it is a good one.

                              Apparently the attachment did not survive the elements of Internet...
                              Here is the patch again:

                              RCS file: /cvsroot/vim/vim7/src/gui_mac.c,v
                              retrieving revision 1.20
                              diff -c -r1.20 gui_mac.c
                              *** src/gui_mac.c 1 Sep 2005 20:36:23 -0000 1.20
                              --- src/gui_mac.c 25 Nov 2005 19:11:13 -0000
                              ***************
                              *** 4300,4305 ****
                              --- 4300,4328 ----
                              {
                              }

                              + /*
                              + * Draw undercurl at the bottom of the character cell.
                              + */
                              + static void
                              + draw_undercurl(int flags, int row, int col, int cells)
                              + {
                              + int i;
                              + int offset;
                              + const static int val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
                              + int y = FILL_Y(row + 1) - 1;
                              +
                              + ForeColor(redColor);
                              +
                              + offset = val[FILL_X(col) % 8];
                              + MoveTo(FILL_X(col), y - offset);
                              +
                              + for (i = FILL_X(col); i < FILL_X(col + cells); ++i)
                              + {
                              + offset = val[i % 8];
                              + LineTo(i, y - offset);
                              + }
                              + }
                              +
                              void
                              gui_mch_draw_string(row, col, s, len, flags)
                              int row;
                              ***************
                              *** 4451,4456 ****
                              --- 4474,4484 ----
                              #endif
                              }

                              + if (flags & DRAW_UNDERC)
                              + {
                              + draw_undercurl(flags, row, col, len);
                              + }
                              +
                              #ifdef FEAT_MBYTE
                              vim_free(tofree);
                              #endif


                              --
                              Jussi Hagman, jhagman@..., iChat/AIM: jussihagman, ICQ: 54004113
                              Studentbyn 4 D 33, 20540 Åbo, Finland +358 50 56 51 170
                            • Alan Schmitt
                              ... Thanks a lot for the patch. Bram, can you let us know when it gets integrated into the tarball? Alan -- Alan Schmitt
                              Message 14 of 16 , Nov 25, 2005
                                On 25 nov. 05, at 20:37, Jussi Hagman wrote:

                                > On 25.11.2005, at 21:27, Jussi Hagman wrote:
                                >>
                                >> OK, here it is at last. It implements the undercurl independently
                                >> of the text drawing mode. I took a contextual cvs diff against the
                                >> newest CVS so I hope it is a good one.
                                >
                                > Apparently the attachment did not survive the elements of
                                > Internet... Here is the patch again:

                                Thanks a lot for the patch. Bram, can you let us know when it gets
                                integrated into the tarball?

                                Alan

                                --
                                Alan Schmitt <http://sardes.inrialpes.fr/~aschmitt/>

                                The hacker: someone who figured things out and made something cool
                                happen.
                                .O.
                                ..O
                                OOO
                              • Bram Moolenaar
                                ... Thanks. I notice you use a fixed color, but I can see how to use RGBForeColor(). I ll try it out... Works fine! -- hundred-and-one symptoms of being an
                                Message 15 of 16 , Nov 26, 2005
                                  Jussi Hagman wrote:

                                  > >> How do you want the patch? Is cvs diff sufficient or should I get
                                  > >> unaltered tree and make manual diff on it?
                                  > >
                                  > > Any kind of context diff will do.
                                  >
                                  > OK, here it is at last. It implements the undercurl independently of
                                  > the text drawing mode. I took a contextual cvs diff against the
                                  > newest CVS so I hope it is a good one.

                                  Thanks. I notice you use a fixed color, but I can see how to use
                                  RGBForeColor(). I'll try it out... Works fine!

                                  --
                                  hundred-and-one symptoms of being an internet addict:
                                  213. Your kids start referring to you as "that guy in front of the monitor."

                                  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                                  /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                                  \\\ download, build and distribute -- http://www.A-A-P.org ///
                                  \\\ help me help AIDS victims -- http://www.ICCF.nl ///
                                Your message has been successfully submitted and would be delivered to recipients shortly.