bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#22873: Can we support multiple Cursors?


From: Keith David Bershatsky
Subject: bug#22873: Can we support multiple Cursors?
Date: Wed, 16 Mar 2016 01:00:41 -0700

This fifth draft patch `multiple_cursors_005.diff` fixes the problem mentioned 
in my last email with the FILLED_BOX_CURSOR (a fake cursor) sometimes taking on 
the background color of the primary active cursor.  I see that the fake cursors 
do not always appear immediately in Emacs for Windows after pressing the F1 key 
to trigger the Lisp function `mc-test` -- i.e., there is a delay before the 
screen updates, so that will be one of my next projects to debug.  I didn't 
update the master branch tonight, so the patch applies as of the March 13, 2016 
commit bearing "181e92c4e060a7ce4740b561375f9ec9f473f144".

(defun mc-test (&optional list)
"Draw fake cursors at all POS defined in the `mc-list'.  Multiple fake cursors
are supported by GUI versions of Emacs built for X, Windows and OSX.
Color vector is LSL (The Linden Scripting Language), rather than standard RGB.
`nsterm.m' uses `NSColor', which works well with LSL.  `w32term.c' uses
`PALETTERGB' or `RGB', and the conversion from LSL is done internally by
multiplying each element of the LSL color vector by 255.  `xterm.c' uses
`x_make_truecolor_pixel', which uses 16-bit RGB -- the conversion from LSL
happens internally by multiplying each element of the LSL color vector by 
65535."
(interactive)
  (setq mc-list (if list list '(
    (3 "hbar" [1.0 0.0 0.0])
    (4 "bar" [0.0 1.0 0.0])
    (5 "box" [0.0 0.0 1.0])
    (6 "hollow" [0.8 0.4 0.2])
    (7 ("hbar" 3) [1.0 0.0 1.0])
    (8 ("bar" 3) [0.0 1.0 1.0])))))

(global-set-key [f1] 'mc-test)

Attachment: multiple_cursors_005.diff
Description: application/diff


reply via email to

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