Hi there,

the applied patch is a crude approach to make the selection handling
more similar to the standard behavior of KDE/Gnome/Windows programs:

1) Del/Backspace with text selected does not modify the buffer but only
removes the selected text
2) cursor movement with text selected cancels the selection

The patch probably should not applied as is. It is meant only as a first
step in the direction. What is missing:
* Both changes should configurable and depend on the Windows/Emacs option
* The second change is not complete yet: it should be extended to other
kinds of cursor movement (mouse, search, etc.) In general, the behavior
should be such, that a selection generally only exists right at the
position of the cursor.

Greetings,
Norbert



Thu Nov  3 15:42:00 CET 2005  [EMAIL PROTECTED]
  * selection handling
diff -rN -u 
old-TeXmacs-1.0.5.10-static-gnu-linux/progs/generic/generic-edit.scm 
new-TeXmacs-1.0.5.10-static-gnu-linux/progs/generic/generic-edit.scm
--- old-TeXmacs-1.0.5.10-static-gnu-linux/progs/generic/generic-edit.scm        
2005-11-03 15:45:40.000000000 +0100
+++ new-TeXmacs-1.0.5.10-static-gnu-linux/progs/generic/generic-edit.scm        
2005-11-03 15:41:12.000000000 +0100
@@ -21,14 +21,14 @@
 ;; Basic editing via the keyboard
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(tm-define (kbd-left) (go-left))
-(tm-define (kbd-right) (go-right))
-(tm-define (kbd-up) (go-up))
-(tm-define (kbd-down) (go-down))
-(tm-define (kbd-page-up) (go-page-up))
-(tm-define (kbd-page-down) (go-page-down))
-(tm-define (kbd-start-line) (go-start-line))
-(tm-define (kbd-end-line) (go-end-line))
+(tm-define (kbd-left) (selection-cancel) (go-left))
+(tm-define (kbd-right) (selection-cancel) (go-right))
+(tm-define (kbd-up) (selection-cancel) (go-up))
+(tm-define (kbd-down) (selection-cancel) (go-down))
+(tm-define (kbd-page-up) (selection-cancel) (go-page-up))
+(tm-define (kbd-page-down) (selection-cancel) (go-page-down))
+(tm-define (kbd-start-line) (selection-cancel) (go-start-line))
+(tm-define (kbd-end-line) (selection-cancel) (go-end-line))
 
 (tm-define (kbd-select r)
   (select-from-shift-keyboard)
@@ -41,7 +41,8 @@
 (tm-define (kbd-remove forward?) (remove-text forward?))
 (tm-define (kbd-remove forward?)
   (:mode with-active-selection?)
-  (clipboard-cut "primary"))
+  (clipboard-cut "nowhere")
+  (clipboard-clear "nowhere"))
 
 (tm-define (kbd-tab)
   (if (not (complete-try?))
diff -rN -u old-TeXmacs-1.0.5.10-static-gnu-linux/progs/generic/generic-kbd.scm 
new-TeXmacs-1.0.5.10-static-gnu-linux/progs/generic/generic-kbd.scm
--- old-TeXmacs-1.0.5.10-static-gnu-linux/progs/generic/generic-kbd.scm 
2005-11-03 15:45:40.000000000 +0100
+++ new-TeXmacs-1.0.5.10-static-gnu-linux/progs/generic/generic-kbd.scm 
2005-11-03 15:38:28.000000000 +0100
@@ -56,14 +56,14 @@
   ("end" (kbd-end-line))
   ("pageup" (kbd-page-up))
   ("pagedown" (kbd-page-down))
-  ("S-left" (kbd-select kbd-left))
-  ("S-right" (kbd-select kbd-right))
-  ("S-up" (kbd-select kbd-up))
-  ("S-down" (kbd-select kbd-down))
-  ("S-home" (kbd-select kbd-start-line))
-  ("S-end" (kbd-select kbd-end-line))
-  ("S-pageup" (kbd-select kbd-page-up))
-  ("S-pagedown" (kbd-select kbd-page-down))
+  ("S-left" (kbd-select go-left))
+  ("S-right" (kbd-select go-right))
+  ("S-up" (kbd-select go-up))
+  ("S-down" (kbd-select go-down))
+  ("S-home" (kbd-select go-start-line))
+  ("S-end" (kbd-select go-end-line))
+  ("S-pageup" (kbd-select go-page-up))
+  ("S-pagedown" (kbd-select go-page-down))
   ("C-left" (traverse-left))
   ("C-right" (traverse-right))
   ("C-up" (traverse-up))

_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to