Plan 9 from Bell Labs’s /usr/web/sources/patch/applied/acmechord/readme

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


i've noticed that when snarfing some text in an acme window by
chording cut & paste that the window often ends up in "modified"
state.

after some experimentation, i've found that this is because i'm
generating the following sequence of button events (button 1 least
significant):

	0 0 1
	0 1 1
	1 1 1
	1 0 1
	1 0 0
	0 0 0

i.e. button 1 is being released before button 3.
acme interprets the last event as an extra "paste", which
sets the window to modified.

this patch is one way of fixing the problem: it makes

	b1-b2-b3-b3...

equivalent to:

	b1-b2-b3

the fix relies on the observation that once you've done one operation
(cut or paste) you'll never do a different operation (other than undo)
for that chording sequence.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.