Commit 8079917
patch 9.0.2041: trim(): hard to use default mask
Problem: trim(): hard to use default mask (partly revert v9.0.2040)
Solution: use default mask when it is empty
The default 'mask' value is pretty complex, as it includes many
characters. Yet, if one needs to specify the trimming direction, the
third argument, 'trim()' currently requires the 'mask' value to be
provided explicitly.
Currently, an empty 'mask' will make 'trim()' call return 'text' value
that is passed in unmodified. It is unlikely that someone is using it,
so the chances of scripts being broken by this change are low.
Also, this reverts commit 9.0.2040 (which uses v:none for the default
and requires to use an empty string instead).
closes: #13358
Signed-off-by: Christian Brabandt <[email protected]>
Co-authored-by: Illia Bobyr <[email protected]>1 parent 5a33ce2 commit 8079917
File tree
8 files changed
+27
-56
lines changed- runtime/doc
- src
- proto
- testdir
8 files changed
+27
-56
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10119 | 10119 | | |
10120 | 10120 | | |
10121 | 10121 | | |
10122 | | - | |
10123 | | - | |
10124 | | - | |
10125 | | - | |
| 10122 | + | |
| 10123 | + | |
| 10124 | + | |
10126 | 10125 | | |
10127 | 10126 | | |
10128 | 10127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3539 | 3539 | | |
3540 | 3540 | | |
3541 | 3541 | | |
3542 | | - | |
3543 | | - | |
3544 | 3542 | | |
3545 | 3543 | | |
3546 | 3544 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1962 | 1962 | | |
1963 | 1963 | | |
1964 | 1964 | | |
1965 | | - | |
| 1965 | + | |
1966 | 1966 | | |
1967 | 1967 | | |
1968 | 1968 | | |
| |||
1971 | 1971 | | |
1972 | 1972 | | |
1973 | 1973 | | |
1974 | | - | |
| 1974 | + | |
1975 | 1975 | | |
1976 | 1976 | | |
1977 | 1977 | | |
1978 | | - | |
1979 | | - | |
1980 | | - | |
1981 | 1978 | | |
1982 | | - | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
1983 | 1982 | | |
1984 | | - | |
1985 | | - | |
1986 | | - | |
1987 | | - | |
1988 | | - | |
| 1983 | + | |
1989 | 1984 | | |
1990 | | - | |
1991 | | - | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
1992 | 1996 | | |
1993 | 1997 | | |
1994 | 1998 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2231 | 2231 | | |
2232 | 2232 | | |
2233 | 2233 | | |
2234 | | - | |
| 2234 | + | |
2235 | 2235 | | |
2236 | 2236 | | |
2237 | 2237 | | |
2238 | 2238 | | |
2239 | | - | |
2240 | | - | |
2241 | | - | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
2242 | 2242 | | |
2243 | 2243 | | |
2244 | 2244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4786 | 4786 | | |
4787 | 4787 | | |
4788 | 4788 | | |
4789 | | - | |
| 4789 | + | |
4790 | 4790 | | |
4791 | 4791 | | |
4792 | 4792 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | 453 | | |
485 | 454 | | |
486 | 455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
704 | 704 | | |
705 | 705 | | |
706 | 706 | | |
| 707 | + | |
| 708 | + | |
707 | 709 | | |
708 | 710 | | |
709 | 711 | | |
| |||
0 commit comments