Re: [PATCH] Bug 3363: internal middle button paste does not mark buffer dirty.

2007-06-02 Thread Bo Peng

  So we will be in company. :-)

  OK.


Committed at r18632.

Bo


Re: [PATCH] Bug 3363: internal middle button paste does not mark buffer dirty.

2007-06-02 Thread José Matos
On Saturday 02 June 2007 03:40:59 Bo Peng wrote:
> Both emacs and gvim put cursor after pasted text.

  So we will be in company. :-)

  OK.

> Bo

-- 
José Abílio


Re: [PATCH] Bug 3363: internal middle button paste does not mark buffer dirty.

2007-06-02 Thread José Matos
On Friday 01 June 2007 22:27:47 Bo Peng wrote:
> This patch partially fix bug 3363 by marking buffer dirty after
> internal middle button paste.
>
> Seems easy enough. Jose?

  Yes.

> Bo


-- 
José Abílio


Re: [PATCH] Bug 3363: internal middle button paste does not mark buffer dirty.

2007-06-02 Thread Jean-Marc Lasgouttes
> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes:

Bo> This patch partially fix bug 3363 by marking buffer dirty after
Bo> internal middle button paste.

Bo> Seems easy enough. Jose?

Looks correct.

JMarc


Re: [PATCH] Bug 3363: internal middle button paste does not mark buffer dirty.

2007-06-01 Thread Bo Peng

The latter is how middle button paste work in plain text but I prefer
the former.


Both emacs and gvim put cursor after pasted text.

Bo


Re: [PATCH] Bug 3363: internal middle button paste does not mark buffer dirty.

2007-06-01 Thread Bo Peng

On 6/1/07, Bo Peng <[EMAIL PROTECTED]> wrote:

This patch partially fix bug 3363 by marking buffer dirty after
internal middle button paste.


Another half of the bug: cursor not set with middle button paste in
InsetTabular.

Index: src/insets/InsetTabular.cpp
===
--- src/insets/InsetTabular.cpp (revision 18628)
+++ src/insets/InsetTabular.cpp (working copy)
@@ -3212,6 +3212,7 @@
 "paragraph");
   }
   doDispatch(cur, cmd);
+   cur.bv().mouseSetCursor(cur);
   }
   break;



There is something very interesting here. If | is the cursor, pasting HH at

ab|cd

get

abHH|cd

If I move cur.bv().mouseSetCursor(cur) before doDispatch, I get

ab|HHcd

The latter is how middle button paste work in plain text but I prefer
the former. Can I also change the behavior in plain text? The argument
behind this is that after pasting, I usually want to edit 'after' the
pasted text. (No RTL is considered here).

Jose, pick the one you like.

Bo


[PATCH] Bug 3363: internal middle button paste does not mark buffer dirty.

2007-06-01 Thread Bo Peng

This patch partially fix bug 3363 by marking buffer dirty after
internal middle button paste.

Seems easy enough. Jose?

Bo

Index: src/Text3.cpp
===
--- src/Text3.cpp   (revision 18628)
+++ src/Text3.cpp   (working copy)
@@ -1032,6 +1032,7 @@
   if (paste_internally) {
   cap::pasteSelection(cur,
bv->buffer()->errorList("Paste"));
   bv->buffer()->errors("Paste");
+   bv->buffer()->markDirty();
   cur.clearSelection(); // bug 393
   bv->switchKeyMap();
   finishUndo();