mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 06:48:17 +00:00
Merge pull request #1238 from joshhartigan/zero-division-patch
clang: Division by zero
This commit is contained in:
@@ -7630,7 +7630,7 @@ void unshowmode(int force)
|
|||||||
static void draw_tabline(void)
|
static void draw_tabline(void)
|
||||||
{
|
{
|
||||||
int tabcount = 0;
|
int tabcount = 0;
|
||||||
int tabwidth;
|
int tabwidth = 0;
|
||||||
int col = 0;
|
int col = 0;
|
||||||
int scol = 0;
|
int scol = 0;
|
||||||
int attr;
|
int attr;
|
||||||
@@ -7676,9 +7676,13 @@ static void draw_tabline(void)
|
|||||||
++tabcount;
|
++tabcount;
|
||||||
}
|
}
|
||||||
|
|
||||||
tabwidth = (Columns - 1 + tabcount / 2) / tabcount;
|
if (tabcount > 0) {
|
||||||
if (tabwidth < 6)
|
tabwidth = (Columns - 1 + tabcount / 2) / tabcount;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tabwidth < 6) {
|
||||||
tabwidth = 6;
|
tabwidth = 6;
|
||||||
|
}
|
||||||
|
|
||||||
attr = attr_nosel;
|
attr = attr_nosel;
|
||||||
tabcount = 0;
|
tabcount = 0;
|
||||||
|
Reference in New Issue
Block a user