diff --git a/gui/notepad/src/notepad.tal b/gui/notepad/src/notepad.tal index 1ffa5fe..f982bad 100644 --- a/gui/notepad/src/notepad.tal +++ b/gui/notepad/src/notepad.tal @@ -124,7 +124,8 @@ ( ) DUP2 #0200 NEQ2 ?{ file-save } DUP2 #0200 NEQ2 ?{ ( from ) ,&x1 LDR2 ,&y1 LDR2 - ( to ) .Mouse/x DEI2 .Mouse/y DEI2 #0012 SUB2 + ( to x ) ,&x1 LDR2 .Mouse/x DEI2 snap + ( to y ) ,&y1 LDR2 .Mouse/y DEI2 #0012 SUB2 snap ( paint ) #01 } DUP2 #00 NEQ #0001 NEQ2 ?{ @@ -251,6 +252,10 @@ !&>while &end POP2r JMP2r +@snap ( x1* x2* -- x* ) + SUB2k abs2 #0008 LTH2 ?{ NIP2 JMP2r } + POP2 JMP2r + ( @|selection )