vim-patch:7.4.984

Problem:    searchpos() always starts searching in the first column, which is
            not what some people expect. (Brett Stahlman)
Solution:   Add the 'z' flag: start at the specified column.

ad4d8a192a
This commit is contained in:
watiko
2016-02-23 03:37:16 +09:00
parent 576c5f7b74
commit 4d5d76c086
6 changed files with 106 additions and 70 deletions

View File

@@ -15,19 +15,20 @@
#define ACTION_SHOW_ALL 4
#define ACTION_EXPAND 5
/* Values for 'options' argument in do_search() and searchit() */
#define SEARCH_REV 0x01 /* go in reverse of previous dir. */
#define SEARCH_ECHO 0x02 /* echo the search command and handle options */
#define SEARCH_MSG 0x0c /* give messages (yes, it's not 0x04) */
#define SEARCH_NFMSG 0x08 /* give all messages except not found */
#define SEARCH_OPT 0x10 /* interpret optional flags */
#define SEARCH_HIS 0x20 /* put search pattern in history */
#define SEARCH_END 0x40 /* put cursor at end of match */
#define SEARCH_NOOF 0x80 /* don't add offset to position */
#define SEARCH_START 0x100 /* start search without col offset */
#define SEARCH_MARK 0x200 /* set previous context mark */
#define SEARCH_KEEP 0x400 /* keep previous search pattern */
#define SEARCH_PEEK 0x800 /* peek for typed char, cancel search */
// Values for 'options' argument in do_search() and searchit()
#define SEARCH_REV 0x01 ///< go in reverse of previous dir.
#define SEARCH_ECHO 0x02 ///< echo the search command and handle options
#define SEARCH_MSG 0x0c ///< give messages (yes, it's not 0x04)
#define SEARCH_NFMSG 0x08 ///< give all messages except not found
#define SEARCH_OPT 0x10 ///< interpret optional flags
#define SEARCH_HIS 0x20 ///< put search pattern in history
#define SEARCH_END 0x40 ///< put cursor at end of match
#define SEARCH_NOOF 0x80 ///< don't add offset to position
#define SEARCH_START 0x100 ///< start search without col offset
#define SEARCH_MARK 0x200 ///< set previous context mark
#define SEARCH_KEEP 0x400 ///< keep previous search pattern
#define SEARCH_PEEK 0x800 ///< peek for typed char, cancel search
#define SEARCH_COL 0x1000 ///< start at specified column instead of zero
/* Values for flags argument for findmatchlimit() */
#define FM_BACKWARD 0x01 /* search backwards */