mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
(edit_find_word_start): type accuracy for word start.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
b10fc3ce59
commit
25689a32bb
@ -1127,7 +1127,7 @@ static gboolean
|
||||
edit_find_word_start (WEdit * edit, off_t * word_start, gsize * word_len)
|
||||
{
|
||||
int c, last;
|
||||
gsize i;
|
||||
off_t i;
|
||||
|
||||
/* return if at begin of file */
|
||||
if (edit->curs1 <= 0)
|
||||
@ -1142,7 +1142,7 @@ edit_find_word_start (WEdit * edit, off_t * word_start, gsize * word_len)
|
||||
for (i = 2;; i++)
|
||||
{
|
||||
/* return if at begin of file */
|
||||
if ((gsize) edit->curs1 < i)
|
||||
if (edit->curs1 < i)
|
||||
return FALSE;
|
||||
|
||||
last = c;
|
||||
@ -1155,7 +1155,7 @@ edit_find_word_start (WEdit * edit, off_t * word_start, gsize * word_len)
|
||||
return FALSE;
|
||||
|
||||
*word_start = edit->curs1 - (i - 1); /* start found */
|
||||
*word_len = i - 1;
|
||||
*word_len = (gsize) (i - 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user