mirror of
https://github.com/dschmenk/PLASMA.git
synced 2024-11-04 11:07:00 +00:00
Case-ify more of the editor if/ifelse/else
This commit is contained in:
parent
571e8d8eb0
commit
b3c05c9797
@ -690,33 +690,45 @@ def keyin2
|
||||
fin
|
||||
until key >= 128
|
||||
^keystrobe
|
||||
if key == keyctrln
|
||||
key = $DB // '['
|
||||
elsif key == $9E // SHIFT+CTRL+N
|
||||
key = $FE // '~'
|
||||
elsif key == keyctrlp
|
||||
key = $DC // '\'
|
||||
elsif key == $80 // SHIFT+CTRL+P -> CTRL+@
|
||||
key = $FC // '|'
|
||||
elsif key == keyctrlg
|
||||
key = $DF // '_'
|
||||
elsif key == keyarrowleft
|
||||
if ^pushbttn3 < 128
|
||||
key = keydelete
|
||||
fin
|
||||
elsif key >= $C0 and flags < shiftlock
|
||||
if ^pushbttn3 < 128
|
||||
if key == $C0
|
||||
key = $D0 // P
|
||||
elsif key == $DD
|
||||
key = $CD // M
|
||||
elsif key == $DE
|
||||
key = $CE // N
|
||||
when key
|
||||
is keyctrln
|
||||
key = $DB // '['
|
||||
break
|
||||
is $9E // SHIFT+CTRL+N
|
||||
key = $FE // '~'
|
||||
break
|
||||
is keyctrlp
|
||||
key = $DC // '\'
|
||||
break
|
||||
is $80 // SHIFT+CTRL+P -> CTRL+@
|
||||
key = $FC // '|'
|
||||
break
|
||||
is keyctrlg
|
||||
key = $DF // '_'
|
||||
break
|
||||
is keyarrowleft
|
||||
if ^pushbttn3 < 128
|
||||
key = keydelete
|
||||
fin
|
||||
else
|
||||
key = key | $E0
|
||||
fin
|
||||
fin
|
||||
break
|
||||
otherwise
|
||||
if key >= $C0 and flags < shiftlock
|
||||
if ^pushbttn3 < 128
|
||||
when key
|
||||
is $C0
|
||||
key = $D0 // P
|
||||
break
|
||||
is $DD
|
||||
key = $CD // M
|
||||
break
|
||||
is $DE
|
||||
key = $CE // N
|
||||
wend
|
||||
else
|
||||
key = key | $E0
|
||||
fin
|
||||
fin
|
||||
wend
|
||||
return key
|
||||
end
|
||||
def setkeyin#0
|
||||
@ -834,13 +846,7 @@ def splitline#0
|
||||
fin
|
||||
end
|
||||
def editkey(key)
|
||||
if key >= keyspace
|
||||
return TRUE
|
||||
elsif key == keydelete
|
||||
return TRUE
|
||||
elsif key == keyctrld
|
||||
return TRUE
|
||||
elsif key == keyctrlr
|
||||
if key >= keyspace or key == keydelete or key == keyctrld or key == keyctrlr
|
||||
return TRUE
|
||||
fin
|
||||
return FALSE
|
||||
@ -1020,7 +1026,6 @@ def editmode#0
|
||||
fin
|
||||
redraw
|
||||
fin
|
||||
break
|
||||
wend
|
||||
until exit
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user