aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/getchar.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-10-18 13:57:58 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-10-18 13:57:58 -0300
commitfb34028c1e2274d668eb7d7912ada2b163898520 (patch)
tree5f2a1dd7395461be1bc6df7aa259fa8dd63008d3 /src/nvim/getchar.c
parent56ef9e86688e79dc6a6bffe73c505eaaddf3be2d (diff)
parent42112e04a999c0f289939fce3142ef2c2517110a (diff)
downloadrneovim-fb34028c1e2274d668eb7d7912ada2b163898520.tar.gz
rneovim-fb34028c1e2274d668eb7d7912ada2b163898520.tar.bz2
rneovim-fb34028c1e2274d668eb7d7912ada2b163898520.zip
Merge PR #1300 'Refactor input buffer'
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r--src/nvim/getchar.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c
index c3f6e2c2b6..fd60664b7b 100644
--- a/src/nvim/getchar.c
+++ b/src/nvim/getchar.c
@@ -50,6 +50,7 @@
#include "nvim/ui.h"
#include "nvim/undo.h"
#include "nvim/os/event.h"
+#include "nvim/os/input.h"
/*
* These buffers are used for storing:
@@ -1201,9 +1202,7 @@ void save_typeahead(tasave_T *tp)
readbuf1.bh_first.b_next = NULL;
tp->save_readbuf2 = readbuf2;
readbuf2.bh_first.b_next = NULL;
-# ifdef USE_INPUT_BUF
- tp->save_inputbuf = get_input_buf();
-# endif
+ tp->save_inputbuf = input_buffer_save();
}
/*
@@ -1224,9 +1223,7 @@ void restore_typeahead(tasave_T *tp)
readbuf1 = tp->save_readbuf1;
free_buff(&readbuf2);
readbuf2 = tp->save_readbuf2;
-# ifdef USE_INPUT_BUF
- set_input_buf(tp->save_inputbuf);
-# endif
+ input_buffer_restore(tp->save_inputbuf);
}
/*
@@ -2551,21 +2548,6 @@ fix_input_buffer (
return len;
}
-#if defined(USE_INPUT_BUF) || defined(PROTO)
-/*
- * Return TRUE when bytes are in the input buffer or in the typeahead buffer.
- * Normally the input buffer would be sufficient, but feedkeys() may insert
- * characters in the typeahead buffer while we are waiting for input to arrive.
- */
-int input_available(void)
-{
- return !vim_is_input_buf_empty()
- || typebuf_was_filled
- ;
-}
-
-#endif
-
/*
* map[!] : show all key mappings
* map[!] {lhs} : show key mapping for {lhs}