ops.c: eliminate static variable y_current

This variable isn't stateful, and should be passed around instead.

Helped-By: Scott Prager <splinterofchaos@gmail.com>
Helped-By: Michael Reed <m.reed@mykolab.com>
This commit is contained in:
Björn Linse
2015-04-13 15:05:40 +02:00
parent c1a3d289d6
commit 96e9d261cf
4 changed files with 223 additions and 264 deletions

View File

@@ -47,6 +47,14 @@ typedef int (*Indenter)(void);
#define OP_FORMAT2 26 /* "gw" format operator, keeps cursor pos */
#define OP_FUNCTION 27 /* "g@" call 'operatorfunc' */
/// Contents of a yank (read-write) register
typedef struct yankreg {
char_u **y_array; ///< pointer to array of line pointers
linenr_T y_size; ///< number of lines in y_array
char_u y_type; ///< MLINE, MCHAR or MBLOCK
colnr_T y_width; ///< only set if y_type == MBLOCK
} yankreg_T;
/// Flags for get_reg_contents().
enum GRegFlags {
kGRegNoExpr = 1, ///< Do not allow expression register.