|
1 | | -*eval.txt* For Vim version 7.0aa. Last change: 2005 Jul 25 |
| 1 | +*eval.txt* For Vim version 7.0aa. Last change: 2005 Jul 28 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -2416,29 +2416,24 @@ get({dict}, {key} [, {default}]) |
2416 | 2416 |
|
2417 | 2417 | *getbufline()* |
2418 | 2418 | getbufline({expr}, {lnum} [, {end}]) |
2419 | | - Return the lines starting from {lnum} to {end} in the buffer |
2420 | | - {expr} as a List. If {end} is omitted, only the line {lnum} |
2421 | | - is returned. |
| 2419 | + Return a List with the lines starting from {lnum} to {end} |
| 2420 | + (inclusive) in the buffer {expr}. If {end} is omitted, a List |
| 2421 | + with only the line {lnum} is returned. |
2422 | 2422 |
|
2423 | 2423 | For the use of {expr}, see |bufname()| above. |
2424 | 2424 |
|
2425 | | - When {lnum} is a String that doesn't start with a |
2426 | | - digit, line() is called to translate the String into a Number. |
2427 | | - |
2428 | | - {end} is used in the same way as {lnum}. |
| 2425 | + For {lnum} and {end} "$" can be used for the last line of the |
| 2426 | + buffer. Otherwise a number must be used. |
2429 | 2427 |
|
2430 | 2428 | When {lnum} is smaller than 1 or bigger than the number of |
2431 | 2429 | lines in the buffer, an empty List is returned. |
2432 | 2430 |
|
2433 | 2431 | When {end} is greater than the number of lines in the buffer, |
2434 | 2432 | it is treated as {end} is set to the number of lines in the |
2435 | | - buffer. |
2436 | | - |
2437 | | - When non-existing line ranges are specified, an empty List is |
2438 | | - returned. When {end} is before {lnum} an empty List is |
| 2433 | + buffer. When {end} is before {lnum} an empty List is |
2439 | 2434 | returned. |
2440 | 2435 |
|
2441 | | - This function works only for loaded buffers. For unloaded and |
| 2436 | + This function works only for loaded buffers. For unloaded and |
2442 | 2437 | non-existing buffers, an empty List is returned. |
2443 | 2438 |
|
2444 | 2439 | Example: > |
|
0 commit comments