Mercurial > vim
diff src/move.c @ 17863:08f1dd29550e v8.1.1928
patch 8.1.1928: popup windows don't move with the text when making changes
Commit: https://github.com/vim/vim/commit/12034e22dd80cf533ac1c681be521ab299383f63
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 25 22:25:02 2019 +0200
patch 8.1.1928: popup windows don't move with the text when making changes
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 25 Aug 2019 22:30:03 +0200 |
parents | 59f8948b7590 |
children | 9f51d0cef8da |
line wrap: on
line diff
--- 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 */