Mercurial > vim
comparison src/buffer.c @ 6466:b5df99582638 v7.4.562
updated for version 7.4.562
Problem: Segfault with wide screen and error in 'rulerformat'. (Ingo Karkat)
Solution: Check there is enough space. (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 07 Jan 2015 13:31:52 +0100 |
parents | 27a36d1013a6 |
children | c1ed973fb58f |
comparison
equal
deleted
inserted
replaced
6465:616912dd90aa | 6466:b5df99582638 |
---|---|
4407 int buflen; | 4407 int buflen; |
4408 { | 4408 { |
4409 long above; /* number of lines above window */ | 4409 long above; /* number of lines above window */ |
4410 long below; /* number of lines below window */ | 4410 long below; /* number of lines below window */ |
4411 | 4411 |
4412 if (buflen < 3) /* need at least 3 chars for writing */ | |
4413 return; | |
4412 above = wp->w_topline - 1; | 4414 above = wp->w_topline - 1; |
4413 #ifdef FEAT_DIFF | 4415 #ifdef FEAT_DIFF |
4414 above += diff_check_fill(wp, wp->w_topline) - wp->w_topfill; | 4416 above += diff_check_fill(wp, wp->w_topline) - wp->w_topfill; |
4415 #endif | 4417 #endif |
4416 below = wp->w_buffer->b_ml.ml_line_count - wp->w_botline + 1; | 4418 below = wp->w_buffer->b_ml.ml_line_count - wp->w_botline + 1; |