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

Possible write bug when writing folded lines WO typos

Expand Messages
  • Noel Henson
    This may be what is intended but it seems like a bug to me. Assume the following file: {{{1 Test line 1 Test line 2 Test line 3 Test line 4 Test line 5 Test
    Message 1 of 3 , Aug 16, 2003
    View Source
    • 0 Attachment
      This may be what is intended but it seems like a bug to me.

      Assume the following file:

      {{{1 Test line 1
      Test line 2
      Test line 3
      Test line 4
      Test line 5
      Test line 6
      Test line 7
      Test line 8
      }}}1 Test line 9

      If I execute
      :2,6w! ted
      on the file when the fold is open, ted will have:

      Test line 2
      Test line 3
      Test line 4
      Test line 5
      Test line 6

      If I execute :2,6w! ted on the file when the fold is CLOSED, ted will have:

      {{{1 Test line 1
      Test line 2
      Test line 3
      Test line 4
      Test line 5
      Test line 6
      Test line 7
      Test line 8
      }}}1 Test line 9

      As you can see the entire fold is written, not just the 5 lines I wanted
      written. Is this a bug?

      Thanks,
      Noel
    • Noel Henson
      After hours of searching I discovered my mistaken assumption. Noel
      Message 2 of 3 , Aug 16, 2003
      View Source
      • 0 Attachment
        After hours of searching I discovered my mistaken assumption.

        Noel


        On Saturday 16 August 2003 07:28 am, Noel Henson wrote:
        > This may be what is intended but it seems like a bug to me.
        >
        > Assume the following file:
        >
        > {{{1 Test line 1
        > Test line 2
        > Test line 3
        > Test line 4
        > Test line 5
        > Test line 6
        > Test line 7
        > Test line 8
        > }}}1 Test line 9
        >
        > If I execute
        >
        > :2,6w! ted
        >
        > on the file when the fold is open, ted will have:
        >
        > Test line 2
        > Test line 3
        > Test line 4
        > Test line 5
        > Test line 6
        >
        > If I execute :2,6w! ted on the file when the fold is CLOSED, ted will have:
        >
        > {{{1 Test line 1
        > Test line 2
        > Test line 3
        > Test line 4
        > Test line 5
        > Test line 6
        > Test line 7
        > Test line 8
        > }}}1 Test line 9
        >
        > As you can see the entire fold is written, not just the 5 lines I wanted
        > written. Is this a bug?
        >
        > Thanks,
        > Noel
      • Bram Moolenaar
        ... You probably meant to say when the fold is closed . ... Line numbers are rounded off to include closed folds. See :help fold-behavior . If you don t want
        Message 3 of 3 , Aug 17, 2003
        View Source
        • 0 Attachment
          Noel Henson wrote:

          > This may be what is intended but it seems like a bug to me.
          >
          > Assume the following file:
          >
          > {{{1 Test line 1
          > Test line 2
          > Test line 3
          > Test line 4
          > Test line 5
          > Test line 6
          > Test line 7
          > Test line 8
          > }}}1 Test line 9
          >
          > If I execute
          > :2,6w! ted
          > on the file when the fold is open, ted will have:
          >
          > Test line 2
          > Test line 3
          > Test line 4
          > Test line 5
          > Test line 6
          >
          > If I execute :2,6w! ted on the file when the fold is open, ted will have:

          You probably meant to say "when the fold is closed".

          > {{{1 Test line 1
          > Test line 2
          > Test line 3
          > Test line 4
          > Test line 5
          > Test line 6
          > Test line 7
          > Test line 8
          > }}}1 Test line 9
          >
          > As you can see the entire fold is written, not just the 5 lines I wanted
          > written. Is this a bug?

          Line numbers are rounded off to include closed folds.
          See ":help fold-behavior".
          If you don't want this, then open all folds first, e.g., be resetting
          'foldenable'.

          --
          hundred-and-one symptoms of being an internet addict:
          156. You forget your friend's name but not her e-mail address.

          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
          \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
          \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
        Your message has been successfully submitted and would be delivered to recipients shortly.