Xavier de Gaye wrote:

> On 10/13/07, Xavier de Gaye wrote:
> > algorithm:
> >   next is position of first byte (if exists) after deleted section
> >   partial 1st line if:
> >     first->col != 0 or (next != NULL and first->lnum == next->lnum)
> >   partial last line if:
> >     first->lnum != last->lnum and next != NULL and last->lnum  == next->lnum
> >   delete full lines:
> >     if partial 1st line: from = first + 1 else first
> >     if partial last line: to = last - 1 else last
> >     if to >= from:
> >        move cursor to from
> >        delete to:from
> 
> 
> Hello Bram,
> 
> The following patch fixes the problem.
> 
> I have run the tests with the following setup:
> vim:
>     Makefile: CFLAGS = -DNBDEBUG
>     nbdebug.h: #define nbdebug(a) nbdbg a
> clewn:
>     export SPRO_GVIM_DEBUG=netbeans.log
>     export SPRO_GVIM_DLEVEL=0xffffffff
>     tail -f netbeans.log
>     clewn -d -vc /path/to/patched/vim71/src/vim
>         edit a file and use the following command to remove a
>         section of the file:
>             (gdb) # <bufID> remove <off> <length>
> 
> I have tested all the cases on a file with fileformat=unix, including
> the cases when the section ends on the terminating newline byte.

Thanks!  I'll look at the details when I have some time.

-- 
Now it is such a bizarrely improbable coincidence that anything as
mind-bogglingly useful as the Babel fish could have evolved purely by chance
that some thinkers have chosen to see it as a final and clinching proof of the
NON-existence of God.
The argument goes something like this: 'I refuse to prove that I exist,' says
God, 'for proof denies faith, and without faith I am nothing.'
'But,' says Man, 'the Babel fish is a dead giveaway, isn't it?  It could not
have evolved by chance.  It proves you exist, and so therefore, by your own
arguments, you don't.  QED.'
'Oh dear,' says God, 'I hadn't thought of that,' and promptly vanishes in a
puff of logic.
'Oh, that was easy,' says Man, and for an encore goes on to prove that black
is white and gets himself killed on the next pedestrian crossing.
                -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- 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://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui