aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
Commit message (Collapse)AuthorAge
...
* refactor: replace char_u with charDundar Goc2022-07-31
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_uDundar Goc2022-07-02
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u #18429dundargoc2022-06-28
| | | Work on https://github.com/neovim/neovim/issues/459
* feat(server): instance "name", store pipes in stdpath(state)Justin M. Keyes2022-06-15
| | | | | | | | | | | | | | | | | | Problem: - Unix sockets are created in random /tmp dirs. - /tmp is messy, unclear when OSes actually clear it. - The generated paths are very ugly. This adds friction to reasoning about which paths belong to which Nvim instances. - No way to provide a human-friendly way to identify Nvim instances in logs or server addresses. Solution: - Store unix sockets in stdpath('state') - Allow --listen "name" and serverstart("name") to given a name (which is appended to a generated path). TODO: - is stdpath(state) the right place?
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor: replace char_u variables and functions with charDundar Goc2022-05-16
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-11
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-07
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-04
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-03
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
* refactor: convert macros to all-caps (#17895)dundargoc2022-04-24
| | | Closes https://github.com/neovim/neovim/issues/6297
* vim-patch:8.2.3551: checking first character of url twice (#17910)dundargoc2022-03-30
| | | | | Problem: Checking first character of url twice. Solution: Only check once. (closes vim/vim#9026) https://github.com/vim/vim/commit/94e7d345c156a722bb161b73238c4ba1d27ec586
* vim-patch:8.2.4418: crash when using special multi-byte characterSean Dewar2022-02-19
| | | | | | | | Problem: Crash when using special multi-byte character. Solution: Don't use isalpha() for an arbitrary character. https://github.com/vim/vim/commit/5921aeb5741fc6e84c870d68c7c35b93ad0c9f87 Rename vim_isalpha to mb_isalpha.
* vim-patch:8.2.3939: MS-Windows: fnamemodify('', ':p') does not workzeertzjq2022-02-07
| | | | | | | Problem: MS-Windows: fnamemodify('', ':p') does not work. Solution: Do not consider an empty string a full path. (Yegappan Lakshmanan, closes vim/vim#9428, closes vim/vim#9427) https://github.com/vim/vim/commit/5a664fe57fe7ba65a771bc95ef1c205e4db193b7
* vim-patch:8.2.3824: no ASAN support for MSVCzeertzjq2022-02-07
| | | | | | | Problem: No ASAN support for MSVC. Solution: Add ASAN support and fix a coupld of uncovered problems. (Yegappan Lakshmanan, closes vim/vim#9357) https://github.com/vim/vim/commit/6df0f2759d12ec0bc999b2963ecea4387a2bc516
* vim-patch:8.2.1741: pathshorten() only supports using one characterzeertzjq2022-02-06
| | | | | | | | | | | | | | | | | Problem: pathshorten() only supports using one character. Solution: Add an argument to control the length. (closes vim/vim#7006) https://github.com/vim/vim/commit/6a33ef0deb5c75c003a9f3bd1c57f3ca5e77327e Cherry-pick a line in test from patch 8.2.0634. Use Nvim's config paths in docs. shorten_dir() returning a pointer looks a bit confusing here, as it is actually the same pointer passed to it, and it doesn't really reduce much code, so change it back to void. Assigning rettv->vval.v_string = NULL is not needed if a pointer is within 64 bits. While this is usually the case, I'm not sure if it can be taken for granted.
* Merge pull request #17174 from zeertzjq/vim-8.2.3153bfredl2022-01-27
|\ | | | | vim-patch:8.2.3153: URLs with a dash in the scheme are not recognized
| * vim-patch:8.2.3153: URLs with a dash in the scheme are not recognizedzeertzjq2022-01-24
| | | | | | | | | | | | | | Problem: URLs with a dash in the scheme are not recognized. Solution: Allow for a scheme with a dash, but not at the start or end. (Tsuyoshi CHO, closes vim/vim#8299) https://github.com/vim/vim/commit/7b7a118e74d25ff35cd277c2bb5191ae44bb20b2
* | vim-patch:8.2.3611: crash when using CTRL-W f without finding a file namezeertzjq2022-01-18
|/ | | | | | Problem: Crash when using CTRL-W f without finding a file name. Solution: Bail out when the file name length is zero. https://github.com/vim/vim/commit/615ddd5342b50a6878a907062aa471740bd9a847
* refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* refactor(misc1): move out misc functions which obviously belong elsewhereBjörn Linse2021-12-09
| | | | Also make some function names more descriptive/regular.
* Merge pull request #16362 from zeertzjq/vim-8.2.3617Jan Edmund Lazo2021-11-21
|\ | | | | vim-patch:8.2.{3468,3617,3618,3622}: some other CWD related patches
| * vim-patch:8.2.3468: problem with :cd when editing file in non-existent directoryzeertzjq2021-11-19
| | | | | | | | | | | | | | Problem: Problem with :cd when editing file in non-existent directory. (Yee Cheng Chin) Solution: Prepend the current directory to get the full path. (closes vim/vim#8903) https://github.com/vim/vim/commit/c6376c798433bcb9ee38a8664299d11454546950
* | refactor: saner options for uncrustify (#16204)dundargoc2021-11-19
|/ | | | | | | | | | | | | | | | | | | | | | | | * sp_enum_after_assign = force * sp_brace_typedef = force * nl_do_brace = remove * sp_do_brace_open = force * sp_brace_close_while = force * sp_before_semi = remove * sp_before_semi_for = remove * sp_before_semi_for_empty = remove * sp_between_semi_for_empty = remove * sp_after_semi_for_empty = remove * sp_before_square = remove * sp_before_squares = remove * sp_inside_square = remove * sp_inside_fparens = remove * sp_inside_fparen = remove * sp_inside_tparen = remove * sp_after_tparen_close = remove * sp_return_paren = force * pos_bool = lead * sp_pp_concat = remove * sp_pp_stringify = remove * fixup: disable formatting for the INIT section
* refactor: reduce number of explicit char casts (#16077)dundargoc2021-11-16
| | | * refactor: reduce number of explicit char casts
* refactor(macros): delete multibyte macros which just are aliasesBjörn Linse2021-11-14
|
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* refactor: saner options for uncrustify #16196dundargoc2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: general good option changes sp_deref = remove sp_not = remove sp_inv = remove sp_inside_paren_cast = remove mod_remove_duplicate_include = true sp_after_semi = add sp_after_semi_for = force sp_sizeof_paren = remove nl_return_expr = remove nl_else_brace = remove nl_else_if = remove * refactor: mod_remove_extra_semicolon = true * refactor: nl_max = 3 * refactor: sp_bool = force * refactor: sp_compare = force * refactor: sp_inside_paren = remove * refactor: sp_paren_paren = remove * refactor: sp_inside_sparen = remove * refactor: sp_before_sparen = force * refactor: sp_sign = remove * refactor: sp_addr = remove * refactor: sp_member = remove * refactor: nl_struct_brace = remove * refactor: nl_before_if_closing_paren = remove * refactor: nl_fdef_brace = force * refactor: sp_paren_comma = force * refactor: mod_full_brace_do = add
* refactor: reduce number of unique char castsDundar Göc2021-10-13
|
* refactor: format with uncrustify #15755dundargoc2021-09-24
|
* refactor: convert TRUE/FALSE to true/false (#15660)dundargoc2021-09-18
|
* chore: use codespell to spell check #15016dundargoc2021-07-07
|
* Fix `<afile>` getting prepended with a slash on WinClosed (#14515)Ghjuvan Lacambre2021-06-26
| | | | | | It is wrong to assume that you can't shorten a path if it's in `/`: you can always shorten it by removing the forward slash. Closes #14512
* Remove '- 1' for sizes passed to xstrlcpyJan Edmund Lazo2021-05-19
| | | | | | | | xstrlcpy() NUL-terminates the destination string such that reducing the destination string length by 1 to reserve the last byte for NUL is pointless. https://github.com/neovim/neovim/pull/14490#discussion_r635661185
* path.c: fix path_fnamencmperw72021-02-25
| | | | | Fix the problem that the last comparison of strings when p_fic is true was not ignore case.
* path: add helper for checking a file extensiondm1try2020-12-01
|
* refactor: pass window to was_set_insecurelyMatthieu Coudron2020-11-23
| | | | | | working on get_foldtext and wanted to get rid of the curwin backup/restore. Turns out it's not possible else f_foldtext is run on the same window. Kept the cleanup anyway.
* vim-patch:8.1.0806: too many #ifdefsJan Edmund Lazo2020-11-12
| | | | | | Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 2. https://github.com/vim/vim/commit/fc3abf47fbe1e426f2b676c316c81ee9ff607075
* refactor: move various things to os/shell.cJustin M. Keyes2020-02-02
| | | | | - No code changes - Rename mch_expand_wildcards => os_expand_wildcards
* vim-patch:8.1.1143: may pass weird strings to file name expansionJan Edmund Lazo2020-01-26
| | | | | | Problem: May pass weird strings to file name expansion. Solution: Check for matching characters. Disallow control characters. https://github.com/vim/vim/commit/8f130eda4747e4a4d68353cdb650f359fd01469b
* vim-patch:8.1.2120: some MB_ macros are more complicated than necessaryJan Edmund Lazo2019-10-06
| | | | | | | Problem: Some MB_ macros are more complicated than necessary. (Dominique Pelle) Solution: Simplify the macros. Expand inline. https://github.com/vim/vim/commit/1614a14901558ca091329315d14a7d5e1b53aa47
* vim-patch:8.1.1371: cannot recover from a swap file #11081Jurica Bradarić2019-10-05
| | | | | | | Problem: Cannot recover from a swap file. Solution: Do not expand environment variables in the swap file name. Do not check the extension when we already know a file is a swap file. (Ken Takata, closes 4415, closes vim/vim#4369) https://github.com/vim/vim/commit/99499b1c05f85f83876b828eea3f6e14f0f407b4
* vim-patch:8.1.1897: may free memory twice when out of memory (#10827)Jan Edmund Lazo2019-08-22
| | | | | | Problem: May free memory twice when out of memory. Solution: Check that backslash_halve_save() returns a different pointer. (Dominique Pelle, closes vim/vim#4847) https://github.com/vim/vim/commit/f1552d07d715b437d941659479942c2543b02bd4
* Fix get_path_cutoff() on Windowserw72019-08-17
| | | | | Fix an issue where the result of get_path cutoff() was incorrect when using set shellslash.
* os_can_exe: remove char_uJustin M. Keyes2019-07-21
|
* vim-patch:8.0.1496: VIM_CLEAR()Justin M. Keyes2019-05-25
| | | | | | | | Problem: Clearing a pointer takes two lines. Solution: Add VIM_CLEAR() and replace vim_clear(). (Hirohito Higashi, closes #2629) vim-patch:8.0.1481
* vim-patch:8.0.0876: backslashes and wildcards in backticks don't workJan Edmund Lazo2019-05-07
| | | | | | | Problem: MS-Windows: Backslashes and wildcards in backticks don't work. Solution: Do not handle backslashes inside backticks in the wrong place. (Yasuhiro Matsumoto, closes vim/vim#1942) https://github.com/vim/vim/commit/39d21e3c30f3391f3b27f5ddb7e1ad411bdb8f2e
* os/env: use libuv v1.12 getenv/setenv APIJustin M. Keyes2019-02-27
| | | | | | | | | | | - Minimum required libuv is now v1.12 - Because `uv_os_getenv` requires allocating, we must manage a map (`envmap` in `env.c`) to maintain the old behavior of `os_getenv` . - free() map-items after removal. khash.h does not make copies of anything, so even its keys must be memory-managed by the caller. closes #8398 closes #9267