comparison src/insexpand.c @ 20830:9064044fd4f6 v8.2.0967

patch 8.2.0967: unnecessary type casts for vim_strnsave() Commit: https://github.com/vim/vim/commit/71ccd03ee8a43b20000214a9c99dcc90f039edca Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jun 12 22:59:11 2020 +0200 patch 8.2.0967: unnecessary type casts for vim_strnsave() Problem: Unnecessary type casts for vim_strnsave(). Solution: Remove the type casts.
author Bram Moolenaar <Bram@vim.org>
date Fri, 12 Jun 2020 23:00:04 +0200
parents 4c317d8c1051
children 80a000b09cb0
comparison
equal deleted inserted replaced
20829:3d0d6410aecd 20830:9064044fd4f6
1577 if (curwin->w_cursor.col <= compl_col + compl_length 1577 if (curwin->w_cursor.col <= compl_col + compl_length
1578 || ins_compl_need_restart()) 1578 || ins_compl_need_restart())
1579 ins_compl_restart(); 1579 ins_compl_restart();
1580 1580
1581 vim_free(compl_leader); 1581 vim_free(compl_leader);
1582 compl_leader = vim_strnsave(line + compl_col, (int)(p - line) - compl_col); 1582 compl_leader = vim_strnsave(line + compl_col, (p - line) - compl_col);
1583 if (compl_leader != NULL) 1583 if (compl_leader != NULL)
1584 { 1584 {
1585 ins_compl_new_leader(); 1585 ins_compl_new_leader();
1586 if (compl_shown_match != NULL) 1586 if (compl_shown_match != NULL)
1587 // Make sure current match is not a hidden item. 1587 // Make sure current match is not a hidden item.
1704 // break redo. 1704 // break redo.
1705 if (!compl_opt_refresh_always) 1705 if (!compl_opt_refresh_always)
1706 { 1706 {
1707 vim_free(compl_leader); 1707 vim_free(compl_leader);
1708 compl_leader = vim_strnsave(ml_get_curline() + compl_col, 1708 compl_leader = vim_strnsave(ml_get_curline() + compl_col,
1709 (int)(curwin->w_cursor.col - compl_col)); 1709 curwin->w_cursor.col - compl_col);
1710 if (compl_leader != NULL) 1710 if (compl_leader != NULL)
1711 ins_compl_new_leader(); 1711 ins_compl_new_leader();
1712 } 1712 }
1713 } 1713 }
1714 1714