summaryrefslogtreecommitdiffstats
path: root/src/misc1.c
AgeCommit message (Collapse)Author
2024-03-09patch 9.1.0161: expand() removes slash after env variable that ends with colonv9.1.0161zeertzjq
Problem: expand() removes a slash after an environment variable that ends with a colon on Windows. Solution: Check the correct char for a colon (zeertzjq) closes: #14161 Note: Vim still removes the path-separator at the end, if another path separator follows directly after it, e.g. on: ``` echo $FOO='/usr/' echo expand('$FOO/bar') == '/usr/bar' ``` see: ,----[ misc1.c:1630 ] | // if var[] ends in a path separator and tail[] starts | // with it, skip a character | if (after_pathsep(dst, dst + c) | #if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA) | && (dst == save_dst || dst[-1] != ':') | #endif | && vim_ispathsep(*tail)) | ++tail; `---- Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-30patch 9.0.2138: Overflow logic requires long longv9.0.2138Ernie Rael
Problem: Overflow logic requires long long Solution: Define vimlong_T data type to make life easier for porters closes: #13598 Signed-off-by: Ernie Rael <errael@raelity.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-27patch 9.0.2133: Cannot detect overstrike mode in Cmdline modev9.0.2133Sam-programs
Problem: Cannot detect overstrike mode in Cmdline mode Solution: Make mode() return "cr" for overstrike closes: #13569 Signed-off-by: Sam-programs <None> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-23patch 9.0.2124: INT overflow detection logic can be simplifiedv9.0.2124Ernie Rael
Problem: INT overflow logic can be simplified Solution: introduce trim_to_int() function closes: #13556 Signed-off-by: Ernie Rael <errael@raelity.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-19patch 9.0.2114: overflow detection not accurate when adding digitsv9.0.2114Christian Brabandt
Problem: overflow detection not accurate when adding digits Solution: Use a helper function Use a helper function to better detect overflows before adding integer digits to a long or an integer variable respectively. Signal the overflow to the caller function. closes: #13539 Signed-off-by: Christian Brabandt <cb@256bit.org> Signed-off-by: Michael Henry <vim@drmikehenry.com> Signed-off-by: Ernie Rael <errael@raelity.com>
2023-11-16patch 9.0.2111: [security]: overflow in get_numberv9.0.2111Christian Brabandt
Problem: [security]: overflow in get_number Solution: Return 0 when the count gets too large [security]: overflow in get_number When using the z= command, we may overflow the count with values larger than MAX_INT. So verify that we do not overflow and in case when an overflow is detected, simply return 0 Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-03patch 9.0.1855: mode() doesn't indicate command line for terminalv9.0.1855h-east
Problem: mode() doesn't indicate command line for terminal Solution: make it return 'ct' for command-line from Terminal mode closes: #6265 closes: #13017 closes: #13018 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: h-east <h.east.727@gmail.com>
2023-08-17patch 9.0.1729: screenpos() wrong when w_skipcol and cpoptions+=nv9.0.1729zeertzjq
Problem: screenpos() wrong result with w_skipcol and cpoptions+=n Solution: Use adjust_plines_for_skipcol() instead of subtracting w_skipcol. closes: #12625 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-05-11patch 9.0.1544: recent glibc marks sigset() as a deprecatedv9.0.1544ichizok
Problem: Recent glibc marks sigset() as a deprecated. Solution: Use sigaction() in mch_signal() if possible. (Ozaki Kiichi, closes #12373)
2023-02-21patch 9.0.1336: functions without arguments are not always declared properlyv9.0.1336Yegappan Lakshmanan
Problem: Functions without arguments are not always declared properly. Solution: Use "(void)" instead of "()". (Yegappan Lakshmanan, closes #12031)
2023-02-15patch 9.0.1313: some settings use the current codepage instead of 'encoding'v9.0.1313K.Takata
Problem: Some settings use the current codepage instead of 'encoding'. Solution: Adjust how options are initialized. (Ken Takata, closes #11992)
2023-01-17patch 9.0.1215: using isalpha() adds dependency on current localev9.0.1215zeertzjq
Problem: Using isalpha() adds dependency on current locale. Solution: Do not use isalpha() for recognizing a URL or the end of an Ex command. (closes #11835)
2023-01-14patch 9.0.1196: code is indented more than necessaryv9.0.1196Yegappan Lakshmanan
Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes #11813)
2022-10-18patch 9.0.0788: ModeChanged autocmd not executed when Visual ends with CTRL-Cv9.0.0788Bram Moolenaar
Problem: ModeChanged autocmd not executed when Visual mode is ended with CTRL-C. Solution: Do not trigger the autocmd when got_int is set. (closes #11394)
2022-09-12patch 9.0.0451: virtual text "above" does not work with 'nowrap'v9.0.0451Bram Moolenaar
Problem: Virtual text "above" does not work with 'nowrap'. Solution: Do wrap the line after. (closes #11084)
2022-08-29patch 9.0.0318: clearing screen causes flickerv9.0.0318Bram Moolenaar
Problem: Clearing screen causes flicker. Solution: Do not clear but redraw in more cases. Add () to "wait_return".
2022-08-26patch 9.0.0284: using static buffer for multiple completion functionsv9.0.0284Bram Moolenaar
Problem: Using static buffer for multiple completion functions. Solution: Use one buffer in expand_T.
2022-08-22patch 9.0.0245: mechanism to prevent recursive screen updating is incompletev9.0.0245Bram Moolenaar
Problem: Mechanism to prevent recursive screen updating is incomplete. Solution: Add "redraw_not_allowed" and set it in build_stl_str_hl(). (issue #10952)
2022-08-14patch 9.0.0206: redraw flags are not named specificallyv9.0.0206Bram Moolenaar
Problem: Redraw flags are not named specifically. Solution: Prefix "UPD_" to the flags, for UPDate_screen().
2022-08-09patch 9.0.0179: cursor pos wrong with wrapping virtual text in empty linev9.0.0179Bram Moolenaar
Problem: Cursor position wrong with wrapping virtual text in empty line. Solution: Adjust handling of an empty line. (closes #10875)
2022-08-06patch 9.0.0151: a "below" aligned text property does not work with 'nowrap'v9.0.0151Bram Moolenaar
Problem: A "below" aligned text property does not work with 'nowrap'. Solution: Start a new screen line to display the virtual text. (closes #10851)
2022-07-25patch 9.0.0067: cannot show virtual textv9.0.0067Bram Moolenaar
Problem: Cannot show virtual text. Solution: Initial changes for virtual text support, using text properties.
2022-07-02patch 9.0.0028: MS-Windows: tests fail if there is a "runtime" directoryv9.0.0028Bram Moolenaar
Problem: MS-Windows: tests fail if there is a stray "runtime" directory. Solution: Only use a "runtime" directory if it contains "defaults.vim".
2022-06-27patch 8.2.5170: tiny issuesv8.2.5170Bram Moolenaar
Problem: Tiny issues. Solution: Tiny improvements.
2022-06-11patch 8.2.5077: various warnings from clang on MS-Windowsv8.2.5077Yegappan Lakshmanan
Problem: Various warnings from clang on MS-Windows. Solution: Avoid the warnings. (Yegappan Lakshmanan, closes #10553)
2022-05-09patch 8.2.4928: various white space and cosmetic mistakesv8.2.4928Bram Moolenaar
Problem: Various white space and cosmetic mistakes. Solution: Change spaces to tabs, improve comments.
2022-05-07patch 8.2.4911: the mode #defines are not clearly namedv8.2.4911Bram Moolenaar
Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first.
2022-04-29patch 8.2.4845: duplicate codev8.2.4845zeertzjq
Problem: Duplicate code. Solution: Move code below if/else. (closes #10314)
2022-04-17patch 8.2.4773: build failure without the +eval featurev8.2.4773Bram Moolenaar
Problem: Build failure without the +eval feature. Solution: Use other error message. Avoid warnings.
2022-04-17patch 8.2.4772: old Coverity warning for not checking ftell() return valuev8.2.4772Bram Moolenaar
Problem: Old Coverity warning for not checking ftell() return value. Solution: Check return value of fseek() and ftell().
2022-04-15patch 8.2.4756: build error without the +eval featurev8.2.4756Bram Moolenaar
Problem: Build error without the +eval feature. Solution: Adjust #ifdefs.
2022-04-15patch 8.2.4754: using cached values after unsetting some environment variablesv8.2.4754LemonBoy
Problem: Still using cached values after unsetting some known environment variables. Solution: Take care of the side effects. (closes #10194)
2022-04-14patch 8.2.4750: small pieces of dead codev8.2.4750=?UTF-8?q?Dundar=20G=C3=B6c?=
Problem: Small pieces of dead code. Solution: Remove the dead code. (Goc Dundar, closes #10190) Rename the qftf_cb struct member to avoid confusion.
2022-04-13patch 8.2.4745: using wrong flag for using bell in the terminalv8.2.4745Bram Moolenaar
Problem: Using wrong flag for using bell in the terminal. Solution: Change to use BO_TERM.
2022-04-09patch 8.2.4723: the ModeChanged autocmd event is inefficientv8.2.4723LemonBoy
Problem: The ModeChanged autocmd event is inefficient. Solution: Avoid allocating memory. (closes #10134) Rename trigger_modechanged() to may_trigger_modechanged().
2022-01-28patch 8.2.4241: some type casts are redundantv8.2.4241=?UTF-8?q?Dundar=20G=C3=B6c?=
Problem: Some type casts are redundant. Solution: Remove the type casts. (closes #9643)
2022-01-08patch 8.2.4038: various code not used when features are disabledv8.2.4038Dominique Pelle
Problem: Various code not used when features are disabled. Solution: Add #ifdefs. (Dominique Pellé, closes #9491)
2022-01-04patch 8.2.4005: error messages are spread outv8.2.4005Bram Moolenaar
Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
2022-01-01patch 8.2.3967: error messages are spread outv8.2.3967Bram Moolenaar
Problem: Error messages are spread out. Solution: Move more errors to errors.h.
2021-12-27patch 8.2.3914: various spelling mistakes in commentsv8.2.3914Dominique Pelle
Problem: Various spelling mistakes in comments. Solution: Fix the mistakes. (Dominique Pellé, closes #9416)
2021-12-05patch 8.2.3750: error messages are everywherev8.2.3750Bram Moolenaar
Problem: Error messages are everywhere. Solution: Move more error messages to errors.h and adjust the names.
2021-12-04patch 8.2.3738: screen is cleared when a FocusLost autocommand triggersv8.2.3738Bram Moolenaar
Problem: Screen is cleared when a FocusLost autocommand triggers. Solution: Do not redraw when at the hit-enter or more prompt. (closes #9274)
2021-11-17patch 8.2.3609: internal error when ModeChanged is triggered recursivelyv8.2.3609Bram Moolenaar
Problem: Internal error when ModeChanged is triggered when v:event is already in use. Solution: Save and restore v:event if needed.
2021-10-22patch 8.2.3555: ModeChanged is not triggered on every mode changev8.2.3555=?UTF-8?q?Magnus=20Gro=C3=9F?=
Problem: ModeChanged is not triggered on every mode change. Solution: Also trigger on minor mode changes. (Maguns Gross, closes #8999)
2021-10-21patch 8.2.3551: checking first character of url twicev8.2.3551itchyny
Problem: Checking first character of url twice. Solution: Only check once. (closes #9026)
2021-10-03patch 8.2.3466: completion submode not indicated for virtual replacev8.2.3466zeertzjq
Problem: Completion submode not indicated for virtual replace. Solution: Add submode to "Rv". (closes #8945)
2021-10-02patch 8.2.3462: ModeChanged only uses one character for new_mode and old_modev8.2.3462Bram Moolenaar
Problem: The ModeChanged event only uses one character for the new_mode and old_mode values. Solution: Pass one as first argument to mode(). (issue #8856)
2021-10-02patch 8.2.3461: cannot distinguish Normal and Terminal-Normal modev8.2.3461Bram Moolenaar
Problem: Cannot distinguish Normal and Terminal-Normal mode. Solution: Make mode() return "nt" for Terminal-Normal mode. (issue #8856)
2021-09-12patch 8.2.3430: no generic way to trigger an autocommand on mode changev8.2.3430=?UTF-8?q?Magnus=20Gro=C3=9F?=
Problem: No generic way to trigger an autocommand on mode change. Solution: Add the ModeChanged autocommand event. (Magnus Gross, closes #8856)
2021-07-28patch 8.2.3236: mode() does not indicate using CTRL-O in Select modev8.2.3236zeertzjq
Problem: mode() does not indicate using CTRL-O in Select mode. Solution: Use "vs" and similar. (closes #8640)