comparison runtime/doc/eval.txt @ 15335:18c20ceee4b5 v8.1.0675

patch 8.1.0675: text property column in screen columns is not practical commit https://github.com/vim/vim/commit/b9c67a51c15481d9257e5c26581d17780e9808d5 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 1 19:49:20 2019 +0100 patch 8.1.0675: text property column in screen columns is not practical Problem: Text property column is screen columns is not practical. Solution: Use byte values for the column.
author Bram Moolenaar <Bram@vim.org>
date Tue, 01 Jan 2019 20:00:07 +0100
parents 9d3d7b0f4861
children 0d76dd701e49
comparison
equal deleted inserted replaced
15334:9d3d7b0f4861 15335:18c20ceee4b5
1 *eval.txt* For Vim version 8.1. Last change: 2018 Dec 28 1 *eval.txt* For Vim version 8.1. Last change: 2019 Jan 01
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
6687 "prompt". Example: > 6687 "prompt". Example: >
6688 call prompt_setprompt(bufnr(''), 'command: ') 6688 call prompt_setprompt(bufnr(''), 'command: ')
6689 < 6689 <
6690 *prop_add()* *E965* 6690 *prop_add()* *E965*
6691 prop_add({lnum}, {col}, {props}) 6691 prop_add({lnum}, {col}, {props})
6692 Attach a text property at position {lnum}, {col}. Use one for 6692 Attach a text property at position {lnum}, {col}. {col} is
6693 the first column. 6693 counted in bytes, use one for the first column.
6694 If {lnum} is invalid an error is given. *E966* 6694 If {lnum} is invalid an error is given. *E966*
6695 If {col} is invalid an error is given. *E964* 6695 If {col} is invalid an error is given. *E964*
6696 6696
6697 {props} is a dictionary with these fields: 6697 {props} is a dictionary with these fields:
6698 length length of text in characters, can only be used 6698 length length of text in bytes, can only be used
6699 for a property that does not continue in 6699 for a property that does not continue in
6700 another line 6700 another line; can be zero
6701 end_lnum line number for end of text 6701 end_lnum line number for the end of text
6702 end_col last column of the text; not used when 6702 end_col column just after the text; not used when "length"
6703 "length" is present 6703 is present; when {col} and "end_col" are equal
6704 this is a zero-width text property
6704 bufnr buffer to add the property to; when omitted 6705 bufnr buffer to add the property to; when omitted
6705 the current buffer is used 6706 the current buffer is used
6706 id user defined ID for the property; when omitted 6707 id user defined ID for the property; when omitted
6707 zero is used 6708 zero is used
6708 type name of the text property type 6709 type name of the text property type
6709 All fields except "type" are optional. 6710 All fields except "type" are optional.
6710 6711
6711 It is an error when both "length" and "end_lnum" or "end_col" 6712 It is an error when both "length" and "end_lnum" or "end_col"
6712 are passed. Either use "length" or "end_col" for a property 6713 are given. Either use "length" or "end_col" for a property
6713 within one line, or use "end_lnum" and "end_col" for a 6714 within one line, or use "end_lnum" and "end_col" for a
6714 property that spans more than one line. 6715 property that spans more than one line.
6715 When neither "length" nor "end_col" are passed the property 6716 When neither "length" nor "end_col" are given the property
6716 will apply to one character. 6717 will be zero-width. That means it will not be highlighted but
6718 will move with the text, as a kind of mark.
6717 The property can end exactly at the last character of the 6719 The property can end exactly at the last character of the
6718 text, or just after it. In the last case, if text is appended 6720 text, or just after it. In the last case, if text is appended
6719 to the line, the text property size will increase, also when 6721 to the line, the text property size will increase, also when
6720 the property type does not have "end_incl" set. 6722 the property type does not have "end_incl" set.
6721 6723