浏览代码

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

git-svn-id: branches/unicodekvm@41489 -
nickysn 6 年之前
父节点
当前提交
529c765041
共有 1 个文件被更改,包括 7 次插入7 次删除
  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
                   assigned(NPT^.SpecialHandler) then
                  break;
-             End;
-           if ch<>#0 then
-             begin
-               store[arrayind]:=ch;
-               inc(arrayind);
-             end;
-           if not assigned(NNPT) then
+             End
+           else
              begin
                if ch<>#0 then
                  begin
@@ -1508,6 +1503,11 @@ begin
                  end;
                break;
              end;
+           if ch<>#0 then
+             begin
+               store[arrayind]:=ch;
+               inc(arrayind);
+             end;
         end;
       if assigned(NPT) and NPT^.CanBeTerminal then
         begin