mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 11:18:19 +00:00
Extract cursor.h from misc{1,2}.h and memline.h
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "nvim/version_defs.h"
|
||||
#include "nvim/misc1.h"
|
||||
#include "nvim/charset.h"
|
||||
#include "nvim/cursor.h"
|
||||
#include "nvim/diff.h"
|
||||
#include "nvim/edit.h"
|
||||
#include "nvim/eval.h"
|
||||
@@ -1795,23 +1796,6 @@ int gchar_pos(pos_T *pos)
|
||||
return (int)*ptr;
|
||||
}
|
||||
|
||||
int gchar_cursor(void)
|
||||
{
|
||||
if (has_mbyte)
|
||||
return (*mb_ptr2char)(ml_get_cursor());
|
||||
return (int)*ml_get_cursor();
|
||||
}
|
||||
|
||||
/*
|
||||
* Write a character at the current cursor position.
|
||||
* It is directly written into the block.
|
||||
*/
|
||||
void pchar_cursor(int c)
|
||||
{
|
||||
*(ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE)
|
||||
+ curwin->w_cursor.col) = c;
|
||||
}
|
||||
|
||||
/*
|
||||
* Skip to next part of an option argument: Skip space and comma.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user