summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-02-26 23:04:13 +0000
committerBram Moolenaar <Bram@vim.org>2005-02-26 23:04:13 +0000
commit05159a0c6a27a030c8497c5cf836977090f9e75d (patch)
tree9ccc167cf3e830e5d01aff4555f99d854cbb623b /src/ui.c
parent5313dcb75ac76501f23d21ac94efdbeeabc860bc (diff)
downloadvim-git-05159a0c6a27a030c8497c5cf836977090f9e75d.tar.gz
updated for version 7.0052v7.0052
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/ui.c b/src/ui.c
index 6d100dcd4..0941a3799 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -138,6 +138,11 @@ ui_inchar(buf, maxlen, wtime, tb_change_cnt)
}
#endif
+#ifdef FEAT_PROFILE
+ if (do_profiling && wtime != 0)
+ prof_inchar_enter();
+#endif
+
#ifdef NO_CONSOLE_INPUT
/* Don't wait for character input when the window hasn't been opened yet.
* Do try reading, this works when redirecting stdin from a file.
@@ -150,12 +155,13 @@ ui_inchar(buf, maxlen, wtime, tb_change_cnt)
# ifndef NO_CONSOLE
retval = mch_inchar(buf, maxlen, 10L, tb_change_cnt);
if (retval > 0 || typebuf_changed(tb_change_cnt))
- return retval;
+ goto theend;
# endif
if (wtime == -1 && ++count == 1000)
read_error_exit();
buf[0] = CAR;
- return 1;
+ retval = 1;
+ goto theend;
}
#endif
@@ -186,6 +192,13 @@ ui_inchar(buf, maxlen, wtime, tb_change_cnt)
ctrl_c_interrupts = TRUE;
+#ifdef NO_CONSOLE_INPUT
+theend:
+#endif
+#ifdef FEAT_PROFILE
+ if (do_profiling && wtime != 0)
+ prof_inchar_exit();
+#endif
return retval;
}