Merge branch 'release/5.1.0'
This commit is contained in:
commit
09e654731e
15
clipmenud
15
clipmenud
|
@ -188,19 +188,14 @@ while true; do
|
||||||
|
|
||||||
debug "New clipboard entry on $selection selection: \"$first_line\""
|
debug "New clipboard entry on $selection selection: \"$first_line\""
|
||||||
|
|
||||||
# Without checking ${last_data[any]}, we often double write since both
|
|
||||||
# selections get the same content
|
|
||||||
cache_file_output="$(date +%s%N) $first_line"
|
cache_file_output="$(date +%s%N) $first_line"
|
||||||
if [[ ${last_data[any]} != "$data" ]]; then
|
filename="$cache_dir/$(cksum <<< "$first_line")"
|
||||||
filename="$cache_dir/$(cksum <<< "$first_line")"
|
debug "Writing $data to $filename"
|
||||||
debug "Writing $data to $filename"
|
printf '%s' "$data" > "$filename"
|
||||||
printf '%s' "$data" > "$filename"
|
|
||||||
|
|
||||||
debug "Writing $cache_file_output to $cache_file"
|
debug "Writing $cache_file_output to $cache_file"
|
||||||
printf '%s\n' "$cache_file_output" >> "$cache_file"
|
printf '%s\n' "$cache_file_output" >> "$cache_file"
|
||||||
fi
|
|
||||||
|
|
||||||
last_data[any]=$data
|
|
||||||
last_cache_file_output[$selection]=$cache_file_output
|
last_cache_file_output[$selection]=$cache_file_output
|
||||||
|
|
||||||
if (( CM_OWN_CLIPBOARD )) && [[ $selection != primary ]] &&
|
if (( CM_OWN_CLIPBOARD )) && [[ $selection != primary ]] &&
|
||||||
|
|
Loading…
Reference in a new issue