Browse Source

* simplify an 'if A' followed by an 'if not A' sequence to 'if A then...else...'

git-svn-id: branches/unicodekvm@41489 -
nickysn 6 years ago
parent
commit
529c765041
1 changed files with 7 additions and 7 deletions
  1. 7 7
      packages/rtl-console/src/unix/keyboard.pp

+ 7 - 7
packages/rtl-console/src/unix/keyboard.pp

@@ -1489,13 +1489,8 @@ begin
                if NPT^.CanBeTerminal and
                if NPT^.CanBeTerminal and
                   assigned(NPT^.SpecialHandler) then
                   assigned(NPT^.SpecialHandler) then
                  break;
                  break;
-             End;
-           if ch<>#0 then
-             begin
-               store[arrayind]:=ch;
-               inc(arrayind);
-             end;
-           if not assigned(NNPT) then
+             End
+           else
              begin
              begin
                if ch<>#0 then
                if ch<>#0 then
                  begin
                  begin
@@ -1508,6 +1503,11 @@ begin
                  end;
                  end;
                break;
                break;
              end;
              end;
+           if ch<>#0 then
+             begin
+               store[arrayind]:=ch;
+               inc(arrayind);
+             end;
         end;
         end;
       if assigned(NPT) and NPT^.CanBeTerminal then
       if assigned(NPT) and NPT^.CanBeTerminal then
         begin
         begin