Skip to content

Commit e855c2e

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents eba9637 + 23c1b2b commit e855c2e

17 files changed

Lines changed: 548 additions & 158 deletions

runtime/doc/options.txt

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6314,17 +6314,18 @@ A jump table for the options with a short description can be found at |Q_op|.
63146314
geom pixelGeometry int 0 - 2 (see below)
63156315
renmode renderingMode int 0 - 6 (see below)
63166316
taamode textAntialiasMode int 0 - 3 (see below)
6317+
scrlines Scroll Lines int >= 0 (see below)
63176318

6318-
See this URL for detail:
6319-
http://msdn.microsoft.com/en-us/library/dd368190.aspx
6319+
See this URL for detail (except for scrlines):
6320+
https://msdn.microsoft.com/en-us/library/dd368190.aspx
63206321

63216322
For geom: structure of a device pixel.
63226323
0 - DWRITE_PIXEL_GEOMETRY_FLAT
63236324
1 - DWRITE_PIXEL_GEOMETRY_RGB
63246325
2 - DWRITE_PIXEL_GEOMETRY_BGR
63256326

63266327
See this URL for detail:
6327-
http://msdn.microsoft.com/en-us/library/dd368114.aspx
6328+
https://msdn.microsoft.com/en-us/library/dd368114.aspx
63286329

63296330
For renmode: method of rendering glyphs.
63306331
0 - DWRITE_RENDERING_MODE_DEFAULT
@@ -6336,7 +6337,7 @@ A jump table for the options with a short description can be found at |Q_op|.
63366337
6 - DWRITE_RENDERING_MODE_OUTLINE
63376338

63386339
See this URL for detail:
6339-
http://msdn.microsoft.com/en-us/library/dd368118.aspx
6340+
https://msdn.microsoft.com/en-us/library/dd368118.aspx
63406341

63416342
For taamode: antialiasing mode used for drawing text.
63426343
0 - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT
@@ -6345,7 +6346,25 @@ A jump table for the options with a short description can be found at |Q_op|.
63456346
3 - D2D1_TEXT_ANTIALIAS_MODE_ALIASED
63466347

63476348
See this URL for detail:
6348-
http://msdn.microsoft.com/en-us/library/dd368170.aspx
6349+
https://msdn.microsoft.com/en-us/library/dd368170.aspx
6350+
6351+
For scrlines: threshold for lines to be scrolled.
6352+
0 - Always use scrolling. (default)
6353+
1 - Use full page redrawing.
6354+
> 1 - If the lines to be scrolled is grater or equal to the
6355+
specified value, use redrawing. Otherwise use
6356+
scrolling.
6357+
6358+
If you feel scrolling a page (CTRL-F) is too slow with DirectX
6359+
renderer, try this "scrlines" option.
6360+
When set it "1", Vim uses full page redrawing instead of
6361+
scrolling. Redrawing a page is faster than scrolling a
6362+
page in some environments.
6363+
After that, when you feel scrolling lines (CTRL-Y) becomes
6364+
slow, please try "2" or greater value for this option.
6365+
It works threshold line number to switch scrolling to
6366+
redrawing. Scrolling a few lines might be faster than
6367+
redrawing a page in some environments.
63496368

63506369
Example: >
63516370
set encoding=utf-8
@@ -6354,13 +6373,12 @@ A jump table for the options with a short description can be found at |Q_op|.
63546373
<
63556374
If select a raster font (Courier, Terminal or FixedSys which
63566375
have ".fon" extension in file name) to 'guifont', it will be
6357-
drawn by GDI as a fallback. This fallback will cause
6358-
significant slow down on drawing.
6376+
drawn by GDI as a fallback.
63596377

63606378
NOTE: It is known that some fonts and options combination
63616379
causes trouble on drawing glyphs.
63626380

6363-
- 'rendmode:5' and 'renmode:6' will not work with some
6381+
- 'renmode:5' and 'renmode:6' will not work with some
63646382
special made fonts (True-Type fonts which includes only
63656383
bitmap glyphs).
63666384
- 'taamode:3' will not work with some vector fonts.

src/ex_cmds2.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,6 +1834,26 @@ script_dump_profile(FILE *fd)
18341834
{
18351835
if (vim_fgets(IObuff, IOSIZE, sfd))
18361836
break;
1837+
/* When a line has been truncated, append NL, taking care
1838+
* of multi-byte characters . */
1839+
if (IObuff[IOSIZE - 2] != NUL && IObuff[IOSIZE - 2] != NL)
1840+
{
1841+
int n = IOSIZE - 2;
1842+
# ifdef FEAT_MBYTE
1843+
if (enc_utf8)
1844+
{
1845+
/* Move to the first byte of this char.
1846+
* utf_head_off() doesn't work, because it checks
1847+
* for a truncated character. */
1848+
while (n > 0 && (IObuff[n] & 0xc0) == 0x80)
1849+
--n;
1850+
}
1851+
else if (has_mbyte)
1852+
n -= mb_head_off(IObuff, IObuff + n);
1853+
# endif
1854+
IObuff[n] = NL;
1855+
IObuff[n + 1] = NUL;
1856+
}
18371857
if (i < si->sn_prl_ga.ga_len
18381858
&& (pp = &PRL_ITEM(si, i))->snp_count > 0)
18391859
{

0 commit comments

Comments
 (0)