comparison src/ops.c @ 34803:bcacdee71db4 v9.1.0274

patch 9.1.0274: MS-Windows: a few compiler warnings Commit: https://github.com/vim/vim/commit/aca8f55596ee350110984c1ca5ab6c39f40bb8a6 Author: Mike Williams <mrmrdubya@gmail.com> Date: Sun Apr 7 18:26:22 2024 +0200 patch 9.1.0274: MS-Windows: a few compiler warnings Problem: MS-Windows: a few compiler warnings Solution: Change variable types to resolve compiler warnings (Mike Williams) Windows compiles were reporting a few size_t to signed integer conversion warnings that can be resolved by changing the variable declarations to be size_t to start with. closes: #14429 Signed-off-by: Mike Williams <mrmrdubya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 07 Apr 2024 18:30:05 +0200
parents fd15dc02c223
children f59010300ceb
comparison
equal deleted inserted replaced
34802:3611ffb6ecad 34803:bcacdee71db4
1591 if (curwin->w_cursor.lnum != oap->start.lnum || got_int) 1591 if (curwin->w_cursor.lnum != oap->start.lnum || got_int)
1592 return; 1592 return;
1593 1593
1594 if (oap->block_mode) 1594 if (oap->block_mode)
1595 { 1595 {
1596 long ins_len; 1596 size_t ins_len;
1597 char_u *firstline, *ins_text; 1597 char_u *firstline, *ins_text;
1598 struct block_def bd2; 1598 struct block_def bd2;
1599 int did_indent = FALSE; 1599 int did_indent = FALSE;
1600 size_t len; 1600 size_t len;
1601 int add; 1601 size_t add;
1602 // offset when cursor was moved in insert mode 1602 // offset when cursor was moved in insert mode
1603 int offset = 0; 1603 int offset = 0;
1604 1604
1605 // If indent kicked in, the firstline might have changed 1605 // If indent kicked in, the firstline might have changed
1606 // but only do that, if the indent actually increased. 1606 // but only do that, if the indent actually increased.
1701 else 1701 else
1702 // moved outside of the visual block, what to do? 1702 // moved outside of the visual block, what to do?
1703 return; 1703 return;
1704 } 1704 }
1705 } 1705 }
1706 if ((size_t)add > len) 1706 if (add > len)
1707 add = len; // short line, point to the NUL 1707 add = len; // short line, point to the NUL
1708 firstline += add; 1708 firstline += add;
1709 len -= add; 1709 len -= add;
1710 if (pre_textlen >= 0 && (ins_len = len - pre_textlen - offset) > 0) 1710 if (pre_textlen >= 0 && (ins_len = len - pre_textlen - offset) > 0)
1711 { 1711 {