#include <assert.h>
#include <inttypes.h>
#include <stdbool.h>
#include <string.h>
#include "nvim/api/extmark.h"
#include "nvim/api/private/helpers.h"
#include "nvim/api/ui.h"
#include "nvim/api/vim.h"
#include "nvim/arabic.h"
#include "nvim/ascii.h"
#include "nvim/buffer.h"
#include "nvim/charset.h"
#include "nvim/cursor.h"
#include "nvim/cursor_shape.h"
#include "nvim/decoration.h"
#include "nvim/decoration_provider.h"
#include "nvim/diff.h"
#include "nvim/edit.h"
#include "nvim/eval.h"
#include "nvim/ex_cmds.h"
#include "nvim/ex_cmds2.h"
#include "nvim/ex_getln.h"
#include "nvim/extmark.h"
#include "nvim/fileio.h"
#include "nvim/fold.h"
#include "nvim/garray.h"
#include "nvim/getchar.h"
#include "nvim/highlight.h"
#include "nvim/highlight_group.h"
#include "nvim/indent.h"
#include "nvim/lib/kvec.h"
#include "nvim/log.h"
#include "nvim/lua/executor.h"
#include "nvim/main.h"
#include "nvim/mark.h"
#include "nvim/match.h"
#include "nvim/mbyte.h"
#include "nvim/memline.h"
#include "nvim/memory.h"
#include "nvim/menu.h"
#include "nvim/message.h"
#include "nvim/move.h"
#include "nvim/normal.h"
#include "nvim/option.h"
#include "nvim/os/time.h"
#include "nvim/os_unix.h"
#include "nvim/path.h"
#include "nvim/plines.h"
#include "nvim/popupmnu.h"
#include "nvim/quickfix.h"
#include "nvim/regexp.h"
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/sign.h"
#include "nvim/spell.h"
#include "nvim/state.h"
#include "nvim/strings.h"
#include "nvim/syntax.h"
#include "nvim/terminal.h"
#include "nvim/ui.h"
#include "nvim/ui_compositor.h"
#include "nvim/undo.h"
#include "nvim/version.h"
#include "nvim/vim.h"
#include "nvim/window.h"
Data Structures | |
struct | LineState |
struct | WinExtmark |
Macros | |
#define | MB_FILLER_CHAR |
#define | LINE_STATE(p) { p, 0, 0 } |
#define | DID_NONE 1 |
#define | DID_LINE 2 |
#define | DID_FOLD 3 |
#define | SPWORDLEN 150 |
#define | WL_START 0 |
#define | WL_CMDLINE (WL_START + 1) |
#define | WL_FOLD (WL_CMDLINE + 1) |
#define | WL_SIGN (WL_FOLD + 1) |
#define | WL_NR (WL_SIGN + 1) |
#define | WL_BRI (WL_NR + 1) |
#define | WL_SBR (WL_BRI + 1) |
#define | WL_LINE (WL_SBR + 1) |
#define | VCOL_HLC (vcol - vcol_off) |
#define | FIX_FOR_BOGUSCOLS |
#define | L_MATCH(m) (showtail ? sm_gettail(matches[m], false) : matches[m]) |
#define | RULER_BUF_LEN 70 |
Variables | |
StlClickDefinition * | tab_page_click_defs = NULL |
Array defining what should be done when tabline is clicked. More... | |
long | tab_page_click_defs_size = 0 |
Size of the tab_page_click_defs array. More... | |
#define DID_FOLD 3 |
#define DID_LINE 2 |
#define DID_NONE 1 |
#define FIX_FOR_BOGUSCOLS |
#define MB_FILLER_CHAR |
#define RULER_BUF_LEN 70 |
#define SPWORDLEN 150 |
#define VCOL_HLC (vcol - vcol_off) |
#define WL_BRI (WL_NR + 1) |
#define WL_CMDLINE (WL_START + 1) |
#define WL_FOLD (WL_CMDLINE + 1) |
#define WL_LINE (WL_SBR + 1) |
#define WL_NR (WL_SIGN + 1) |
#define WL_SBR (WL_BRI + 1) |
#define WL_SIGN (WL_FOLD + 1) |
#define WL_START 0 |
Check if there should be a delay. Used before clearing or redrawing the screen or the command line.
Check if the new Nvim application "shell" dimensions are valid. Correct it if it's too small or way too big.
void clear_tab_page_click_defs | ( | StlClickDefinition *const | tpcd, |
const long | tpcd_size | ||
) |
Clear tab_page_click_defs table
[out] | tpcd | Table to clear. |
[in] | tpcd_size | Size of the table. |
void draw_virt_text | ( | win_T * | wp, |
buf_T * | buf, | ||
int | col_off, | ||
int * | end_col, | ||
int | max_col, | ||
int | win_row | ||
) |
int fillchar_status | ( | int * | attr, |
win_T * | wp | ||
) |
Get the value to show for the language mappings, active 'keymap'.
fmt | format string containing one s item |
buf | buffer for the result |
len | length of buffer |
void grid_assign_handle | ( | ScreenGrid * | grid | ) |
assign a handle to the grid. The grid need not be allocated.
void grid_del_lines | ( | ScreenGrid * | grid, |
int | row, | ||
int | line_count, | ||
int | end, | ||
int | col, | ||
int | width | ||
) |
delete lines on the screen and move lines up. 'end' is the line after the scrolled part. Normally it is Rows. When scrolling region used 'off' is the offset from the top for the region. 'row' and 'end' are relative to the start of the region.
void grid_ins_lines | ( | ScreenGrid * | grid, |
int | row, | ||
int | line_count, | ||
int | end, | ||
int | col, | ||
int | width | ||
) |
'row', 'col' and 'end' are relative to the start of the region.
insert lines on the screen and move the existing lines down 'line_count' is the number of lines to be inserted. 'end' is the line after the scrolled part. Normally it is Rows. 'col' is the column from with we start inserting.
int messaging | ( | void | ) |
int number_width | ( | win_T * | wp | ) |
void redraw_all_later | ( | int | type | ) |
called when the status bars for the buffer 'buf' need to be updated
void redraw_curbuf_later | ( | int | type | ) |
int redrawing | ( | void | ) |
void screen_resize | ( | int | width, |
int | height | ||
) |
Set dimensions of the Nvim application "shell".
Resize the screen to Rows and Columns.
Allocate default_grid.chars[] and other grid arrays.
There may be some time between setting Rows and Columns and (re)allocating default_grid arrays. This happens when starting up and when (manually) changing the shell size. Always use default_grid.Rows and default_grid.Columns to access items in default_grid.chars[]. Use Rows and Columns for positioning text etc. where the final size of the shell is needed.
int showmode | ( | void | ) |
Show current status info in ruler and various other places
always | if false, only show ruler if position has changed. |
Only call if (wp->w_vsep_width != 0).
Delete mode message. Used when ESC is typed which is expected to end Insert mode (but Insert mode didn't end yet!). Caller should check "mode_displayed".
void update_curbuf | ( | int | type | ) |
int update_screen | ( | int | type | ) |
Redraw the parts of the screen that is marked for redraw.
Most code shouldn't call this directly, rather use redraw_later() and and redraw_all_later() to mark parts of the screen as needing a redraw.
type | set to a NOT_VALID to force redraw of entire screen |
Whether cursorline is drawn in a special way
If true, both old and new cursorline will need to be redrawn when moving cursor within windows.
(Re)allocates a window grid if size changed while in ext_multigrid mode. Updates size, offsets and handle for the grid regardless.
If "doclear" is true, don't try to copy from the old grid rather clear the resized grid.
void win_redr_status_matches | ( | expand_T * | xp, |
int | num_matches, | ||
char_u ** | matches, | ||
int | match, | ||
int | showtail | ||
) |
Show wildchar matches in the status line. Show at least the "match" item. We start at item 'first_match' in the list and show all matches that fit.
If inversion is possible we use it. Else '=' characters are used.
matches | list of matches |
Scroll 'line_count' lines at 'row' in window 'wp'.
Positive ‘line_count’ means scrolling down, so that more space is available at 'row'. Negative line_count
implies deleting lines at row
.
int win_signcol_width | ( | win_T * | wp | ) |
Returns width of the signcolumn that should be used for the whole window
wp | window we want signcolumn width from |
StlClickDefinition* tab_page_click_defs = NULL |
Array defining what should be done when tabline is clicked.
long tab_page_click_defs_size = 0 |
Size of the tab_page_click_defs array.