Skip to content

Commit 792f0bf

Browse files
authored
Merge pull request #2541 from h-east/update-textprop
Update textprop.{txt,jax}
2 parents 3a8e66b + 83cb146 commit 792f0bf

2 files changed

Lines changed: 12 additions & 21 deletions

File tree

doc/textprop.jax

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ prop_add({lnum}, {col}, {props})
140140
カレントバッファが使用される
141141
id プロパティのユーザー定義 ID。数値かつ正の値で
142142
ある必要がある |E1510|
143-
"text" を使用する場合、"id" は存在してはなら
144-
ず、自動的に負の数値に設定される。それ以外の場
145-
合はゼロが使用される
143+
"text" を使用する場合、"id" の値は無視され、自
144+
動的に負の数値が割り当てられる。それ以外の場合
145+
は、ゼロが使用される
146146
*E1305*
147147
text {col} の前、または {col} がゼロの場合は行の上/
148148
下に表示されるテキスト。ハイライトによるパディ
@@ -219,13 +219,9 @@ prop_add({lnum}, {col}, {props})
219219
そうしないとテキストのサイズ計算が困難になる)。
220220
負の "id" が選択され、返される。
221221

222-
テキストを含むテキストプロパティがサポートされる前は、非常にま
223-
れではあるが、負の "id" を使用することができた。負の "id" はテ
224-
キストを含むテキストプロパティ用に予約されているため、負の "id"
225-
を使用するとエラーが発生する。テキストを含むテキストプロパティ
226-
が既に存在する場合、負の "id" を使用すると *E1293* が発生する。
227-
負の "id" が使用され、後でテキストを含むテキストプロパティが追
228-
加されると、 *E1339* が発生する。
222+
負の "id" は "text" を含むテキストプロパティ用に予約されてお
223+
り、それ以外の用途には使用できない。負の "id" を使用すると、
224+
*E1293* が発生する。
229225

230226
|method| としても使用できる: >
231227
GetLnum()->prop_add(col, props)

en/textprop.txt

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ prop_add({lnum}, {col}, {props})
141141
the current buffer is used
142142
id user defined ID for the property; must be a
143143
number, should be positive |E1510|;
144-
when using "text" then "id" must not be
145-
present and will be set automatically to a
146-
negative number; otherwise zero is used
144+
when using "text" then any "id" value is
145+
ignored and a negative number is assigned
146+
automatically; otherwise zero is used
147147
*E1305*
148148
text text to be displayed before {col}, or
149149
above/below the line if {col} is zero; prepend
@@ -224,14 +224,9 @@ prop_add({lnum}, {col}, {props})
224224
is difficult to compute).
225225
A negative "id" will be chosen and is returned.
226226

227-
Before text properties with text were supported it was
228-
possible to use a negative "id", even though this was very
229-
rare. Now that negative "id"s are reserved for text
230-
properties with text an error is given when using a negative
231-
"id". When a text property with text already exists using a
232-
negative "id" results in *E1293* . If a negative "id" was
233-
used and later a text property with text is added results in
234-
*E1339* .
227+
Negative "id"s are reserved for text properties with "text"
228+
and cannot be used otherwise. Using a negative "id" results
229+
in *E1293* .
235230

236231
Can also be used as a |method|: >
237232
GetLnum()->prop_add(col, props)

0 commit comments

Comments
 (0)