clipmenu

Simple clipboard management using dmenu
git clone https://git.sinitax.com/cdown/clipmenu
Log | Files | Refs | README | LICENSE | sfeed.txt

commit 95cf774b0d83fe61f64bebf4d65b0f69a9719330
parent d82337d226939a5cbeeb6de1b6708b39bb7a0296
Author: Gravemind <gravemind2a@gmail.com>
Date:   Thu, 19 Apr 2018 10:00:21 +0000

Fix wrong file deleted after partial selection (#76)

It was deleting the file before the partial selection because
`last_filename` was saved before filename was actually ready (so was
actually saving the one before the last).

Fixes #75.
Diffstat:
Mclipmenud | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/clipmenud b/clipmenud @@ -181,9 +181,6 @@ while true; do rm -- "${last_filename[$selection]}" fi - last_data[$selection]=$data - last_filename[$selection]=$filename - first_line=$(get_first_line "$data") debug "New clipboard entry on $selection selection: \"$first_line\"" @@ -191,6 +188,9 @@ while true; do cache_file_output="$(date +%s%N) $first_line" filename="$cache_dir/$(cksum <<< "$first_line")" + last_data[$selection]=$data + last_filename[$selection]=$filename + # Recover without restart if we deleted the entire clip dir. # It's ok that this only applies to the final directory. # shellcheck disable=SC2174