robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
a0c60e819d
master
1#pragma once 2 3#include "nvim/api/private/defs.h" 4#include "nvim/normal_defs.h" 5#include "nvim/os/time_defs.h" 6 7/// flags for do_put() 8enum { 9PUT_FIXINDENT = 1 ,///< make indent look nice 10PUT_CURSEND = 2 ,///< leave cursor after end of new text 11PUT_CURSLINE = 4 ,///< leave cursor on last line of new text 12PUT_LINE = 8 ,///< put register as lines 13PUT_LINE_SPLIT = 16 ,///< split line for linewise register 14PUT_LINE_FORWARD = 32 ,///< put linewise register below Visual sel. 15PUT_BLOCK_INNER = 64 ,///< in block mode, do not add trailing spaces 16}; 17 18/// Registers: 19/// 0 = register for latest (unnamed) yank 20/// 1..9 = registers '1' to '9', for deletes 21/// 10..35 = registers 'a' to 'z' 22/// 36 = delete register '-' 23/// 37 = selection register '*' 24/// 38 = clipboard register '+' 25enum { 26DELETION_REGISTER = 36 , 27NUM_SAVED_REGISTERS = 37 , 28// The following registers should not be saved in ShaDa file: 29STAR_REGISTER = 37 , 30PLUS_REGISTER = 38 , 31NUM_REGISTERS = 39 , 32}; 33 34/// Flags for get_reg_contents(). 35enum GRegFlags { 36kGRegNoExpr = 1 ,///< Do not allow expression register. 37kGRegExprSrc = 2 ,///< Return expression itself for "=" register. 38kGRegList = 4 ,///< Return list. 39}; 40 41/// structure used by block_prep, op_delete and op_yank for blockwise operators 42/// also op_change, op_shift, op_insert, op_replace - AKelly 43struct block_def { 44int startspaces ;///< 'extra' cols before first char 45int endspaces ;///< 'extra' cols after last char 46int textlen ;///< chars in block 47char * textstart ;///< pointer to 1st char (partially) in block 48colnr_T textcol ;///< index of chars (partially) in block 49colnr_T start_vcol ;///< start col of 1st char wholly inside block 50colnr_T end_vcol ;///< start col of 1st char wholly after block 51int is_short ;///< true if line is too short to fit in block 52int is_MAX ;///< true if curswant==MAXCOL when starting 53int is_oneChar ;///< true if block within one character 54int pre_whitesp ;///< screen cols of ws before block 55int pre_whitesp_c ;///< chars of ws before block 56colnr_T end_char_vcols ;///< number of vcols of post-block char 57colnr_T start_char_vcols ;///< number of vcols of pre-block char 58}; 59 60/// Definition of one register 61typedef struct { 62String * y_array ;///< Pointer to an array of Strings. 63size_t y_size ;///< Number of lines in y_array. 64MotionType y_type ;///< Register type 65colnr_T y_width ;///< Register width (only valid for y_type == kBlockWise). 66Timestamp timestamp ;///< Time when register was last modified. 67AdditionalData * additional_data ;///< Additional data from ShaDa file. 68}yankreg_T ; 69 70/// Modes for get_yank_register() 71typedef enum { 72YREG_PASTE , 73YREG_YANK , 74YREG_PUT , 75}yreg_mode_t ;