diff options
author | Zach van Rijn <me@zv.io> | 2022-05-04 02:50:34 +0000 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2022-05-06 12:37:31 -0500 |
commit | fc8a56ec08e755e74c3eeb9b91885dd1d0560f37 (patch) | |
tree | 2a17d6c8bc0f9593fbf3e4f905d91a25c0d13955 /system/less/search-path-lesskey-file.patch | |
parent | 1bf617a9cd6a3b325a4bfee28a69792bcb27afc6 (diff) | |
download | packages-fc8a56ec08e755e74c3eeb9b91885dd1d0560f37.tar.gz packages-fc8a56ec08e755e74c3eeb9b91885dd1d0560f37.tar.bz2 packages-fc8a56ec08e755e74c3eeb9b91885dd1d0560f37.tar.xz packages-fc8a56ec08e755e74c3eeb9b91885dd1d0560f37.zip |
system/less: bump { 581 --> 590 }.
Note that the patches correspond to:
* https://github.com/gwsw/less/commit/5e1f4ce2c3a2c0fd6a953c4f7ca2839370f9c3ae.patch
* https://github.com/gwsw/less/commit/d3edebf528da8a9e15d6be518c24e90462a28698.patch
with minor modifications to remove conflicts in non-code NRO and NEWS files.
Diffstat (limited to 'system/less/search-path-lesskey-file.patch')
-rw-r--r-- | system/less/search-path-lesskey-file.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/system/less/search-path-lesskey-file.patch b/system/less/search-path-lesskey-file.patch new file mode 100644 index 000000000..422376930 --- /dev/null +++ b/system/less/search-path-lesskey-file.patch @@ -0,0 +1,37 @@ +From d3edebf528da8a9e15d6be518c24e90462a28698 Mon Sep 17 00:00:00 2001 +From: Mark Nudelman <markn@greenwoodsoftware.com> +Date: Tue, 19 Oct 2021 14:24:04 -0700 +Subject: [PATCH] Add $HOME/.config to possible locations of lesskey file. + +--- + NEWS | 4 ++++ + decode.c | 13 ++++++++++++- + less.nro.VER | 2 +- + 3 files changed, 17 insertions(+), 2 deletions(-) + +diff --git a/decode.c b/decode.c +index e1a55198..2eb480fa 100644 +--- a/decode.c ++++ b/decode.c +@@ -952,9 +952,20 @@ add_hometable(call_lesskey, envname, def_filename, sysvar) + filename = save(def_filename); + else /* def_filename is just basename */ + { ++ /* Remove first char (normally a dot) unless stored in $HOME. */ + char *xdg = lgetenv("XDG_CONFIG_HOME"); + if (!isnullenv(xdg)) +- filename = dirfile(xdg, def_filename+1, 1); ++ filename = dirfile(xdg, &def_filename[1], 1); ++ if (filename == NULL) ++ { ++ char *home = lgetenv("HOME"); ++ if (!isnullenv(home)) ++ { ++ char *cfg_dir = dirfile(home, ".config", 0); ++ filename = dirfile(cfg_dir, &def_filename[1], 1); ++ free(cfg_dir); ++ } ++ } + if (filename == NULL) + filename = homefile(def_filename); + } |