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

Patch 7.3.830

Expand Messages
  • Bram Moolenaar
    Patch 7.3.830 Problem: :mksession confuses bytes, columns and characters when positioning the cursor. Solution: Use w_virtcol with | instead of
    Message 1 of 4 , Feb 20, 2013
    • 0 Attachment
      Patch 7.3.830
      Problem: :mksession confuses bytes, columns and characters when positioning
      the cursor.
      Solution: Use w_virtcol with "|" instead of w_cursor.col with "l".
      Files: src/ex_docmd.c


      *** ../vim-7.3.829/src/ex_docmd.c 2013-02-14 22:11:31.000000000 +0100
      --- src/ex_docmd.c 2013-02-20 19:13:21.000000000 +0100
      ***************
      *** 10829,10852 ****
      {
      if (fprintf(fd,
      "let s:c = %ld - ((%ld * winwidth(0) + %ld) / %ld)",
      ! (long)wp->w_cursor.col,
      ! (long)(wp->w_cursor.col - wp->w_leftcol),
      (long)wp->w_width / 2, (long)wp->w_width) < 0
      || put_eol(fd) == FAIL
      || put_line(fd, "if s:c > 0") == FAIL
      || fprintf(fd,
      ! " exe 'normal! 0' . s:c . 'lzs' . (%ld - s:c) . 'l'",
      ! (long)wp->w_cursor.col) < 0
      || put_eol(fd) == FAIL
      || put_line(fd, "else") == FAIL
      ! || fprintf(fd, " normal! 0%dl", wp->w_cursor.col) < 0
      || put_eol(fd) == FAIL
      || put_line(fd, "endif") == FAIL)
      return FAIL;
      }
      else
      {
      ! if (fprintf(fd, "normal! 0%dl", wp->w_cursor.col) < 0
      || put_eol(fd) == FAIL)
      return FAIL;
      }
      --- 10829,10852 ----
      {
      if (fprintf(fd,
      "let s:c = %ld - ((%ld * winwidth(0) + %ld) / %ld)",
      ! (long)wp->w_virtcol + 1,
      ! (long)(wp->w_virtcol - wp->w_leftcol),
      (long)wp->w_width / 2, (long)wp->w_width) < 0
      || put_eol(fd) == FAIL
      || put_line(fd, "if s:c > 0") == FAIL
      || fprintf(fd,
      ! " exe 'normal! ' . s:c . '|zs' . %ld . '|'",
      ! (long)wp->w_virtcol + 1) < 0
      || put_eol(fd) == FAIL
      || put_line(fd, "else") == FAIL
      ! || fprintf(fd, " normal! %d|", wp->w_virtcol + 1) < 0
      || put_eol(fd) == FAIL
      || put_line(fd, "endif") == FAIL)
      return FAIL;
      }
      else
      {
      ! if (fprintf(fd, "normal! 0%d|", wp->w_virtcol + 1) < 0
      || put_eol(fd) == FAIL)
      return FAIL;
      }
      *** ../vim-7.3.829/src/version.c 2013-02-20 18:39:07.000000000 +0100
      --- src/version.c 2013-02-20 19:14:18.000000000 +0100
      ***************
      *** 730,731 ****
      --- 730,733 ----
      { /* Add new patch number below this line */
      + /**/
      + 830,
      /**/

      --
      Westheimer's Discovery:
      A couple of months in the laboratory can
      frequently save a couple of hours in the library.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ an exciting new programming language -- http://www.Zimbu.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --
      --
      You received this message from the "vim_dev" 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

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Roland Eggner
      ... Hi Bram, here are my test{91,92} scripts updated to test your patch. -- Regards Roland Eggner ... src/testdir/Make_amiga.mak | 4 +++-
      Message 2 of 4 , Feb 20, 2013
      • 0 Attachment
        On 2013-02-20 Wednesday at 19:27 +0100 Bram Moolenaar wrote:
        > Patch 7.3.830
        > Problem: :mksession confuses bytes, columns and characters when positioning
        > the cursor.
        > Solution: Use w_virtcol with "|" instead of w_cursor.col with "l".
        > Files: src/ex_docmd.c

        Hi Bram,

        here are my test{91,92} scripts updated to test your patch.

        --
        Regards
        Roland Eggner

        ---
        src/testdir/Make_amiga.mak | 4 +++-
        src/testdir/Make_dos.mak | 2 +-
        src/testdir/Make_ming.mak | 2 +-
        src/testdir/Make_os2.mak | 2 +-
        src/testdir/Make_vms.mms | 2 +-
        src/testdir/Makefile | 8 ++++----
        src/testdir/test91.in | 45 +++++++++++++++++++++++++++++++++++++++++++++
        src/testdir/test91.ok | 9 +++++++++
        src/testdir/test92.in | 45 +++++++++++++++++++++++++++++++++++++++++++++
        src/testdir/test92.ok | 9 +++++++++
        10 files changed, 119 insertions(+), 9 deletions(-)
      • Roland Eggner
        ... … updated again to apply on top of patch 7.3.831: Add test{92,93} scripts to test bugfix patch 7.3.830. -- Regards Roland Eggner
        Message 3 of 4 , Feb 21, 2013
        • 0 Attachment
          On 2013-02-20 Wednesday at 23:46 +0100 Roland Eggner wrote:
          > On 2013-02-20 Wednesday at 19:27 +0100 Bram Moolenaar wrote:
          > > Patch 7.3.830
          > > Problem: :mksession confuses bytes, columns and characters when positioning
          > > the cursor.
          > > Solution: Use w_virtcol with "|" instead of w_cursor.col with "l".
          > > Files: src/ex_docmd.c
          >
          > Hi Bram,
          >
          > here are my test{91,92} scripts updated to test your patch.

          … updated again to apply on top of patch 7.3.831:
          Add test{92,93} scripts to test bugfix patch 7.3.830.

          --
          Regards
          Roland Eggner
        • Bram Moolenaar
          ... Thanks! -- BEDEVERE: Wait. Wait ... tell me, what also floats on water? ALL: Bread? No, no, no. Apples .... gravy ... very small rocks ... ARTHUR:
          Message 4 of 4 , Feb 21, 2013
          • 0 Attachment
            Roland Eggner wrote:

            > On 2013-02-20 Wednesday at 23:46 +0100 Roland Eggner wrote:
            > > On 2013-02-20 Wednesday at 19:27 +0100 Bram Moolenaar wrote:
            > > > Patch 7.3.830
            > > > Problem: :mksession confuses bytes, columns and characters when positioning
            > > > the cursor.
            > > > Solution: Use w_virtcol with "|" instead of w_cursor.col with "l".
            > > > Files: src/ex_docmd.c
            > >
            > > Hi Bram,
            > >
            > > here are my test{91,92} scripts updated to test your patch.
            >
            > … updated again to apply on top of patch 7.3.831:
            > Add test{92,93} scripts to test bugfix patch 7.3.830.

            Thanks!

            --
            BEDEVERE: Wait. Wait ... tell me, what also floats on water?
            ALL: Bread? No, no, no. Apples .... gravy ... very small rocks ...
            ARTHUR: A duck.
            "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            \\\ an exciting new programming language -- http://www.Zimbu.org ///
            \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

            --
            --
            You received this message from the "vim_dev" 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

            ---
            You received this message because you are subscribed to the Google Groups "vim_dev" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          Your message has been successfully submitted and would be delivered to recipients shortly.