History

plan9: don't redraw on mouse/key events that are ignored

Sigrid Haflínudóttir committed 6 years ago

Commit 37879731 parent 31668971 file · +7 −2Browse files

Unified · Split

plan9.c+7−2
@@ -732,6 +732,7 @@ threadmain(int argc, char **argv) · 731 unmodified lines
732732 oldw = w = field.width;
733733 oldh = h = field.height;
734734
735+noredraw:
735736 switch (alt(a)) {
736737 case Cmouse:
737738 if (m.buttons == 4) {
@@ -758,6 +759,8 @@ threadmain(int argc, char **argv) · 20 unmodified lines
758759 goto end;
759760 }
760761 complete = 1;
762+ } else {
763+ goto noredraw;
761764 }
762765 break;
763766
@@ -922,10 +925,12 @@ threadmain(int argc, char **argv) · 158 unmodified lines
922925 default:
923926 if (key.rune == Kdel || key.rune == ' ')
924927 key.rune = '.';
925− if (orca_is_valid_glyph(key.rune))
928+ if (orca_is_valid_glyph(key.rune)) {
926929 fieldset(key.rune);
927−// else
930+ } else {
928931 // fprint(2, "unhandled key %04x\n", key.rune);
932+ goto noredraw;
933+ }
929934 break;
930935 }
931936 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t