mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
patch 9.0.0188: strange effects when using "text_align" with non-zero column
Problem: Strange effects when using virtual text with "text_align" and non-zero column. (Martin Tournoij) Solution: Give an error. (closes #10888)
This commit is contained in:
parent
96bde99bf8
commit
82b14c143a
@ -3313,4 +3313,6 @@ EXTERN char e_cmdline_window_already_open[]
|
|||||||
#ifdef FEAT_PROP_POPUP
|
#ifdef FEAT_PROP_POPUP
|
||||||
EXTERN char e_cannot_use_negative_id_after_adding_textprop_with_text[]
|
EXTERN char e_cannot_use_negative_id_after_adding_textprop_with_text[]
|
||||||
INIT(= N_("E1293: Cannot use a negative id after adding a textprop with text"));
|
INIT(= N_("E1293: Cannot use a negative id after adding a textprop with text"));
|
||||||
|
EXTERN char e_can_only_use_text_align_when_column_is_zero[]
|
||||||
|
INIT(= N_("E1294: Can only use text_align when column is zero"));
|
||||||
#endif
|
#endif
|
||||||
|
@ -2530,6 +2530,8 @@ func Test_props_with_text_after()
|
|||||||
|
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
call delete('XscriptPropsWithTextAfter')
|
call delete('XscriptPropsWithTextAfter')
|
||||||
|
|
||||||
|
call assert_fails('call prop_add(1, 2, #{text: "yes", text_align: "right", type: "some"})', 'E1294:')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_props_with_text_after_below_trunc()
|
func Test_props_with_text_after_below_trunc()
|
||||||
|
@ -488,6 +488,11 @@ prop_add_common(
|
|||||||
|
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
goto theend;
|
goto theend;
|
||||||
|
if (start_col != 0)
|
||||||
|
{
|
||||||
|
emsg(_(e_can_only_use_text_align_when_column_is_zero));
|
||||||
|
goto theend;
|
||||||
|
}
|
||||||
if (STRCMP(p, "right") == 0)
|
if (STRCMP(p, "right") == 0)
|
||||||
flags |= TP_FLAG_ALIGN_RIGHT;
|
flags |= TP_FLAG_ALIGN_RIGHT;
|
||||||
else if (STRCMP(p, "below") == 0)
|
else if (STRCMP(p, "below") == 0)
|
||||||
|
@ -735,6 +735,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
188,
|
||||||
/**/
|
/**/
|
||||||
187,
|
187,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user