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

Re: [vimdev] Patch 6.1.142

Expand Messages
  • Charles E. Campbell
    ... I just untar-d vim6.1 and re-applied patches 001-142 and saw the aforementioned behavior (sgi, Irix 5.3). I also confess that I also applied Vince Negri s
    Message 1 of 7 , Jul 29 1:02 PM
    • 0 Attachment
      On Mon, Jul 29, 2002 at 09:41:46PM +0200, Bram Moolenaar wrote:
      >
      > Christian J. Robinson wrote:
      > > > Patch 6.1.142
      > > > Problem: Defining paragraphs without a separating blank line isn't
      > > > possible. Paragraphs can't be formatted automatically.
      > > > Solution: Allow defining paragraphs with lines that end in white space.
      > > > Added the 'w' and 'a' flags in 'formatoptions'.
      > >
      > > I see an interesting bug. If I do:
      > > vim -u NONE -U NONE -c ":se tw=70 fo+=a"
      > >
      > > On a file with the two following lines:
      > > xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
      > > xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
      > >
      > > Then append to the end of the first line the string "aaaa bbbb", I end
      > > up with this:
      > > xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
      > > aaa xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxxa bbbb
      > >
      > > With the cursor inserting at the end of the second line.
      >
      > I can't reproduce this.
      ---------------------------------------------------------------------

      I just untar-d vim6.1 and re-applied patches 001-142 and saw the
      aforementioned behavior (sgi, Irix 5.3). I also confess that
      I also applied Vince Negri's "conceal" patch, but I doubt that
      has much to do with formatoptions.

      Regards,
      Chip Campbell

      --
      Charles E Campbell, Jr, PhD _ __ __
      Goddard Space Flight Center / /_/\_\_/ /
      cec@... /_/ \/_//_/
      PGP public key: http://www.erols.com/astronaut/pgp.html
    • Jürgen Krämer
      Hi, ... the same here on Windows 2000 with all patches. And two further misbehaviours: 1.) pressing x on a character in the second line removes this
      Message 2 of 7 , Jul 29 11:26 PM
      • 0 Attachment
        Hi,

        "Charles E. Campbell" wrote:
        >
        > I just untar-d vim6.1 and re-applied patches 001-142 and saw the
        > aforementioned behavior (sgi, Irix 5.3).

        the same here on Windows 2000 with all patches. And two further
        misbehaviours:

        1.) pressing 'x' on a character in the second line removes this
        character and puts the cursor to the end of the line;
        2.) changing to insert mode with 'i' and entering 'test' puts the
        't' at the correct position, but 'est' is appended at the end
        of line.

        Regards,
        Jürgen

        --
        Jürgen Krämer Softwareentwicklung/-support
        Habel GmbH mailto:jkraemer@...
        Hinteres Öschle 2 Tel: (0 74 61) 93 53 15
        78604 Rietheim-Weilheim Fax: (0 74 61) 93 53 99
      • Mikolaj Machowski
        ... Linux 2.4.18 (Mdk8.2) 6.1.142 I encountered the same behaviour but only if this line is the last line of the file. In every other situation it works fine.
        Message 3 of 7 , Jul 30 4:53 PM
        • 0 Attachment
          On Tue, 30 Jul 2002, [iso-8859-1] Jürgen Krämer wrote:

          > the same here on Windows 2000 with all patches. And two further
          > misbehaviours:
          >
          > 1.) pressing 'x' on a character in the second line removes this
          > character and puts the cursor to the end of the line;
          > 2.) changing to insert mode with 'i' and entering 'test' puts the
          > 't' at the correct position, but 'est' is appended at the end
          > of line.
          >

          Linux 2.4.18 (Mdk8.2) 6.1.142

          I encountered the same behaviour but only if this line is the last line of
          the file. In every other situation it works fine.

          Temporary solution: add blank line to the end of file.

          There are another problems:
          se tw=20 fo+=a

          1.
          aaaaa bbbbb cc
          ddddd eee

          When removing d's from second line the rest doesn't jump to first line
          as it should do(?)

          2.
          Crazy example:

          adasdf axxdddds df$
          asdf asdf ad d sf d$
          sd fsd df df iidasd$
          dffasd fa sdf s fddd$
          dsf asd fasd f asdaf$
          tasd tfa ose o :$

          I don't know if this can occur in real life (yes it can :(, tested in
          various text files) but:

          When adding one letter in first line, fourth (sic!) and next are
          reformatted. It also occurs in other combinations:
          Adding chars in 3 line causes strange behaviour in 5th

          The only pattern I could see it: operation in last or last-1 character of
          line (as in tw) causes strange behaviour.

          Greets

          Mikolaj
        • Bram Moolenaar
          ... The patch I sent should have fixed this. ... This should indeed be formatted. However, it s complicated. Would need to check that the previous line is in
          Message 4 of 7 , Jul 31 11:20 AM
          • 0 Attachment
            Mikolaj Machowski wrote:

            > I encountered the same behaviour but only if this line is the last line of
            > the file. In every other situation it works fine.
            >
            > Temporary solution: add blank line to the end of file.

            The patch I sent should have fixed this.

            > There are another problems:
            > se tw=3D20 fo+=3Da
            >
            > 1.
            > aaaaa bbbbb cc
            > ddddd eee
            >
            > When removing d's from second line the rest doesn't jump to first line
            > as it should do(?)

            This should indeed be formatted. However, it's complicated. Would need
            to check that the previous line is in the same paragraph, start
            reformatting there and (this is the hard bit) put the cursor back where
            it was. It's in the todo list, but don't expect to get this done soon.

            > 2.
            > Crazy example:
            >
            > adasdf axxdddds df$
            > asdf asdf ad d sf d$
            > sd fsd df df iidasd$
            > dffasd fa sdf s fddd$
            > dsf asd fasd f asdaf$
            > tasd tfa ose o :$
            >
            > I don't know if this can occur in real life (yes it can :(, tested in
            > various text files) but:
            >
            > When adding one letter in first line, fourth (sic!) and next are
            > reformatted. It also occurs in other combinations:
            > Adding chars in 3 line causes strange behaviour in 5th
            >
            > The only pattern I could see it: operation in last or last-1 character of
            > line (as in tw) causes strange behaviour.

            What strange behavior? The lines in the example are longer than 20
            chars, thus as soon as you insert something the whole paragraph is
            reformatted to fit in 20 characters. formatting stops at the end of the
            paragraph, not at an unchanged line.

            --
            hundred-and-one symptoms of being an internet addict:
            89. In addition to your e-mail address being on your business cards
            you even have your own domain.

            /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
            /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
            \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
            \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
          • Mikolaj Machowski
            ... 6.1.143 or there is a new version of 6.1.142? sorry, I am not a subscriber of dev-list. ... $ signs are end of lines (sorry I did not write that), thus
            Message 5 of 7 , Jul 31 4:00 PM
            • 0 Attachment
              On Wed, 31 Jul 2002, Bram Moolenaar wrote:

              >
              > Mikolaj Machowski wrote:
              >
              > > I encountered the same behaviour but only if this line is the last line of
              > > the file. In every other situation it works fine.
              > >
              > > Temporary solution: add blank line to the end of file.
              >
              > The patch I sent should have fixed this.

              6.1.143 or there is a new version of 6.1.142?
              sorry, I am not a subscriber of dev-list.

              > > adasdf axxdddds df$
              > > asdf asdf ad d sf d$
              > > sd fsd df df iidasd$
              > > dffasd fa sdf s fddd$
              > > dsf asd fasd f asdaf$
              > > tasd tfa ose o :$
              > >
              > > When adding one letter in first line, fourth (sic!) and next are
              > > reformatted. It also occurs in other combinations:
              > > Adding chars in 3 line causes strange behaviour in 5th
              >
              > What strange behavior? The lines in the example are longer than 20
              > chars, thus as soon as you insert something the whole paragraph is
              > reformatted to fit in 20 characters. formatting stops at the end of the
              > paragraph, not at an unchanged line.

              $ signs are end of lines (sorry I did not write that), thus don't count.

              OK. Another example (maybe not the same but also bugs):
              5th line is not here last line in file

              aaaa bbbbb ccc dd ee
              fff ggg 0000 3333
              hhhhh iii 111 2222
              jjjj kkkk llll mmmmm
              nnnn oooo pppp rrrrr

              If I enter Replace mode (with R) in somewhere in first two lines.
              Examples are worth hundreds of words:

              1. Replace mode in first line: I get

              aaaa rbbbb ccc dd ee
              fff ggg 0000 3333
              hhhhh iii 111 2222
              jjjj kkkk llll
              mmmmm nnnn oooo pppp
              rrrrr

              After Rr on first "b".

              2. Replace mode in second line: Result

              aaaa bbbbb ccc dd ee
              fff ggg r000 3333
              hhhhh iii 111 2222
              jjjj kkkk llll mmmmm
              nnnn oooo pppp
              rrrrr

              After Rr on first "0". The same with 3rd, 4th and 5th line.

              3.
              Oh, and here I can reproduce this strange behaviour. I have:

              aaaa bbbbb ccc dd ee
              fff ggg 0000 3333
              hhhhh iii 111 2222
              jjjj kkkk llll mmmmm
              nnnn oooo pppp
              rrrrr

              And after inserting b in first line:

              aaaa bbbbbb ccc dd
              ee fff ggg 0000 3333
              hhhhh iii 111 2222
              jjjj kkkk llll
              mmmmm nnnn oooo pppp
              rrrrr

              Note: 3rd line did not change.


              And extra space at the end of 4th line in 1., end of 5th line in 2., end
              of 4th line in 3. (in results).


              Greets
              Mikolaj Machowski
            • Bram Moolenaar
              ... I only sent it to the vim-dev list. I m preparing a patch, but found another problem that I also want to fix and include in the patch. ... I see the
              Message 6 of 7 , Aug 1, 2002
              • 0 Attachment
                Mikolaj Machowski wrote:

                > > > I encountered the same behaviour but only if this line is the last line of
                > > > the file. In every other situation it works fine.
                > > >
                > > > Temporary solution: add blank line to the end of file.
                > >
                > > The patch I sent should have fixed this.
                >
                > 6.1.143 or there is a new version of 6.1.142?
                > sorry, I am not a subscriber of dev-list.

                I only sent it to the vim-dev list. I'm preparing a patch, but found
                another problem that I also want to fix and include in the patch.

                > OK. Another example (maybe not the same but also bugs):
                > 5th line is not here last line in file
                >
                > aaaa bbbbb ccc dd ee
                > fff ggg 0000 3333
                > hhhhh iii 111 2222
                > jjjj kkkk llll mmmmm
                > nnnn oooo pppp rrrrr
                >
                > If I enter Replace mode (with R) in somewhere in first two lines.
                > Examples are worth hundreds of words:

                I see the problem. A line that is exactly 'textwidth' long sometimes
                gets broken anyway. This patch should fix it:

                *** ops.c~ Sun Jul 28 21:46:09 2002
                --- ops.c Thu Aug 1 20:17:00 2002
                ***************
                *** 4200,4205 ****
                --- 4200,4206 ----
                (void)set_indent(get_indent(), SIN_CHANGED);

                /* put cursor on last non-space */
                + State = NORMAL; /* don't go past end-of-line */
                coladvance((colnr_T)MAXCOL);
                while (curwin->w_cursor.col && vim_isspace(gchar_cursor()))
                dec_cursor();

                --
                Where do you want to crash today?

                /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
                /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
                \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
                \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
              • Mikolaj Machowski
                ... Sorry for silly question :( I found it on groups.yahoo. Works fine :) ... It seems that patch fixed all listed problems. Thanks :) Mikolaj
                Message 7 of 7 , Aug 1, 2002
                • 0 Attachment
                  On Thu, 1 Aug 2002, Bram Moolenaar wrote:

                  > > 6.1.143 or there is a new version of 6.1.142?
                  > > sorry, I am not a subscriber of dev-list.
                  >
                  > I only sent it to the vim-dev list. I'm preparing a patch, but found
                  > another problem that I also want to fix and include in the patch.

                  Sorry for silly question :( I found it on groups.yahoo. Works fine :)

                  > > OK. Another example (maybe not the same but also bugs):
                  > > 5th line is not here last line in file
                  > >
                  > > aaaa bbbbb ccc dd ee
                  > > fff ggg 0000 3333
                  > > hhhhh iii 111 2222
                  > > jjjj kkkk llll mmmmm
                  > > nnnn oooo pppp rrrrr
                  > >
                  > > If I enter Replace mode (with R) in somewhere in first two lines.
                  > > Examples are worth hundreds of words:
                  >
                  > I see the problem. A line that is exactly 'textwidth' long sometimes
                  > gets broken anyway. This patch should fix it:
                  >

                  It seems that patch fixed all listed problems. Thanks :)

                  Mikolaj
                Your message has been successfully submitted and would be delivered to recipients shortly.