texmacs-dev
[Top][All Lists]
Advanced

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

[Texmacs-dev] Overwriting selections


From: Norbert Nemec
Subject: [Texmacs-dev] Overwriting selections
Date: Thu, 28 Oct 2010 12:19:17 +0200

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
-- 
GRATIS! Movie-FLAT mit über 300 Videos. 
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome



reply via email to

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