[Gd-chatter] r11562 - in trunk/fundev/sources/deuce: . duim
andreas at gwydiondylan.org
andreas at gwydiondylan.org
Wed Dec 19 01:49:48 CET 2007
Author: andreas
Date: Wed Dec 19 01:49:47 2007
New Revision: 11562
Modified:
trunk/fundev/sources/deuce/commands.dylan
trunk/fundev/sources/deuce/display.dylan
trunk/fundev/sources/deuce/duim/events.dylan
trunk/fundev/sources/deuce/module.dylan
trunk/fundev/sources/deuce/windows.dylan
Log:
job: fd
Fix behaviour of C-space in emacs mode, cursor movement no longer
clears the mark.
Modified: trunk/fundev/sources/deuce/commands.dylan
==============================================================================
--- trunk/fundev/sources/deuce/commands.dylan (original)
+++ trunk/fundev/sources/deuce/commands.dylan Wed Dec 19 01:49:47 2007
@@ -836,15 +836,16 @@
let state = frame-command-modifiers(frame);
if (mark())
// If there is already a mark and the motion command is not "shifted",
- // then we clear the mark
- when (logand(state, $shift-key) = 0)
+ // but we set the original mark with a shift, then we clear the mark
+ when ((logand(state, $shift-key) = 0)
+ & (frame.frame-window.window-mark-with-shift))
clear-mark!()
end
else
// If there is not already a mark and the motion command is "shifted",
// then we set the mark
unless (logand(state, $shift-key) = 0)
- move-mark!(point())
+ move-mark!(point(), volatile?: #t)
end
end
end method set-or-clear-mark;
Modified: trunk/fundev/sources/deuce/display.dylan
==============================================================================
--- trunk/fundev/sources/deuce/display.dylan (original)
+++ trunk/fundev/sources/deuce/display.dylan Wed Dec 19 01:49:47 2007
@@ -1931,12 +1931,12 @@
(bp-or-line :: type-union(<bp>, <line>), #key) => ();
define sealed inline method move-mark!
- (bp :: <basic-bp>, #key window) => ()
- move-mark!(bp-line(bp), index: bp-index(bp), window: window)
+ (bp :: <basic-bp>, #key window, volatile?) => ()
+ move-mark!(bp-line(bp), index: bp-index(bp), window: window, volatile?: volatile?)
end method move-mark!;
define sealed method move-mark!
- (line :: <basic-line>, #key index :: <integer> = 0, window) => ()
+ (line :: <basic-line>, #key index :: <integer> = 0, window, volatile?) => ()
let window :: <basic-window> = window | frame-window(*editor-frame*);
let buffer = window-buffer(window);
when (buffer)
@@ -1949,7 +1949,10 @@
window-mark(window) := bp;
window-note-selection-changed(window, bp)
end;
- window-last-mark(window) := window-mark(window)
+ window-last-mark(window) := window-mark(window);
+ when (volatile?)
+ window.window-mark-with-shift := #t;
+ end
end
end method move-mark!;
@@ -1961,6 +1964,7 @@
when (buffer & window-mark(window))
window-last-mark(window) := window-mark(window);
window-mark(window) := #f;
+ window.window-mark-with-shift := #f;
window-note-selection-changed(window, #f);
when (redisplay?)
queue-redisplay(window, $display-region);
Modified: trunk/fundev/sources/deuce/duim/events.dylan
==============================================================================
--- trunk/fundev/sources/deuce/duim/events.dylan (original)
+++ trunk/fundev/sources/deuce/duim/events.dylan Wed Dec 19 01:49:47 2007
@@ -226,7 +226,7 @@
when (bp & ~presentation & bp ~= window-point(sheet))
// If no mark, set it now so that we get a region
unless (window-mark(sheet))
- move-mark!(window-point(sheet), window: sheet)
+ move-mark!(window-point(sheet), window: sheet, volatile?: #t);
end;
// Move the point to extend the region. But first, make sure
// point is on a real line, otherwise 'update-caret-position'
Modified: trunk/fundev/sources/deuce/module.dylan
==============================================================================
--- trunk/fundev/sources/deuce/module.dylan (original)
+++ trunk/fundev/sources/deuce/module.dylan Wed Dec 19 01:49:47 2007
@@ -213,7 +213,8 @@
standard-command-table,
control-X-command-table,
control-C-command-table,
- escape-command-table;
+ escape-command-table,
+ compute-key-binding-documentation;
create <mode>,
<major-mode>,
Modified: trunk/fundev/sources/deuce/windows.dylan
==============================================================================
--- trunk/fundev/sources/deuce/windows.dylan (original)
+++ trunk/fundev/sources/deuce/windows.dylan Wed Dec 19 01:49:47 2007
@@ -77,6 +77,9 @@
init-keyword: point:;
sealed slot window-mark :: false-or(<basic-bp>) = #f,
init-keyword: mark:;
+ // keep track of when the mark was set using Shift + arrow keys
+ // and drop the mark on point movements then
+ sealed slot window-mark-with-shift :: <boolean> = #f;
// This is only set by 'with-temporary-selection'...
sealed slot window-temporary-mark? :: type-union(<boolean>, <bp>) = #f;
sealed slot window-last-mark :: false-or(<basic-bp>) = #f;
More information about the chatter
mailing list