texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] Overwriting selections


From: Sam Liddicott
Subject: Re: [Texmacs-dev] Overwriting selections
Date: Thu, 28 Oct 2010 11:22:18 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13pre) Gecko/20101027 Lanikai/3.1.7pre

On 28/10/10 11:19, Norbert Nemec wrote:
Hi there,

just updated to the latest SVN version for the first time in months. I am impressed by the progress. Great work!

Since the Look&Feel is currently being worked on, I would like to bring up a small issue that has been open for some time: In KDE and probably most other environments, an active selection should be automatically replaced as soon as any other content is entered. This behavior can be achieved by adding one single line:

--------------------------------------
--- a/src/src/Edit/Modify/edit_text.cpp
+++ b/src/src/Edit/Modify/edit_text.cpp
@@ -197,6 +197,7 @@ edit_text_rep::prepare_for_insert () {
 
 void
 edit_text_rep::insert_tree (tree t, path p_in_t) {
+  selection_cut("none");
   if (is_atomic (t) && (p_in_t == end (t)) &&
       is_atomic (subtree (et, path_up (tp))))
     insert (tp, t);
--------------------------------------

I have had this patch in my working repository for quite some time and have not found any unintentional side-effects. Only issue might be to make it depend properly on the L&F environment.

Greetings,
Norbert
On a related note, "undo" ought to restore the selectedness of the last selection.

i.e., if I select a block and CUT and then UNDO, the block ought to re-appear and be selected.

--
[FSF
          Associate Member #2325]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]