Hello,

  this is again about word-delete-forward

JMarc:
> Etienne>   I personally prefer that "word-delete-forward" forward does
> Etienne> not delete the whatever punctuation is after a word. Here is
> Etienne> a patch that does that, and apparently breaks nothing. I
> Etienne> didn't check for sure, but I've used for some time.
> 
>
> Hello again Etienne,
> 
> I took a closer look at your patch and have two remarks:
> 
> - could you make the same thing to word-delete-backward, for
>   consistency? 
    ^^^^^^^^^^^^
    I lyx does not seem to gobble punctuation when deleting backwards,
so no change should be needed.


> 
> - shoudln't there be a check here for the beginning of paragraph?
> 

  Certainly, but I didn't really understand yet how cursor.pos
works. Up to now, that is, by quick inspection and a little
tracing. 


  So the following patch may be used by more knowledgeable lyx
programmers to make a decent patch.


  Cheers, 


  Etienne


======================================================================
--- text.C.orig Mon Jan 11 19:59:34 1999
+++ text.C      Mon Jan 11 21:39:06 1999
@@ -2816,6 +2816,14 @@
                SetCursorIntern(cursor.par, cursor.pos);
                selection = True; // to avoid deletion 
                CursorRightOneWord();
+
+               /* -------> Skip final non-word stuff. */
+               cursor.pos--;
+               while ( (cursor.par->IsSeparator(cursor.pos)
+                        || cursor.par->IsKomma(cursor.pos)) )
+                 cursor.pos--;
+               cursor.pos++;
+
                sel_cursor = cursor;
                cursor = tmpcursor;
                SetSelection(); 
======================================================================



  


Reply via email to