diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-25 22:25:02 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-25 22:25:02 +0200 |
commit | 12034e22dd80cf533ac1c681be521ab299383f63 (patch) | |
tree | ac564b63f00ae8f37c7fc3f8f5c45e3e6b552213 /src/move.c | |
parent | 307c5a5bb77c3728dfab06c30e9f786309c63f74 (diff) | |
download | vim-git-12034e22dd80cf533ac1c681be521ab299383f63.tar.gz |
patch 8.1.1928: popup windows don't move with the text when making changesv8.1.1928
Problem: Popup windows don't move with the text when making changes.
Solution: Add the 'textprop" property to the popup window options, position
the popup relative to a text property. (closes #4560)
No tests yet.
Diffstat (limited to 'src/move.c')
-rw-r--r-- | src/move.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/move.c b/src/move.c index b3475a802..223ed5417 100644 --- a/src/move.c +++ b/src/move.c @@ -1179,12 +1179,12 @@ curs_columns( curwin->w_valid |= VALID_WCOL|VALID_WROW|VALID_VIRTCOL; } -#if defined(FEAT_EVAL) || defined(PROTO) +#if (defined(FEAT_EVAL) || defined(FEAT_TEXT_PROP)) || defined(PROTO) /* * Compute the screen position of text character at "pos" in window "wp" * The resulting values are one-based, zero when character is not visible. */ - static void + void textpos2screenpos( win_T *wp, pos_T *pos, @@ -1213,12 +1213,12 @@ textpos2screenpos( col += off; width = wp->w_width - off + win_col_off2(wp); - /* long line wrapping, adjust row */ + // long line wrapping, adjust row if (wp->w_p_wrap && col >= (colnr_T)wp->w_width && width > 0) { - /* use same formula as what is used in curs_columns() */ + // use same formula as what is used in curs_columns() rowoff = ((col - wp->w_width) / width + 1); col -= rowoff * width; } @@ -1236,7 +1236,9 @@ textpos2screenpos( *ccolp = ccol + coloff; *ecolp = ecol + coloff; } +#endif +#if defined(FEAT_EVAL) || defined(PROTO) /* * "screenpos({winid}, {lnum}, {col})" function */ |