mirror of
https://github.com/dylanaraps/shfm.git
synced 2026-11-06 15:50:58 +00:00
revert centering feature for now
This commit is contained in:
1 file changed
+5
-14
@@ -50,11 +50,7 @@ hist_search() {
|
|||||||
|
|
||||||
for file do
|
for file do
|
||||||
case ${PWD%%/}/$file in
|
case ${PWD%%/}/$file in
|
||||||
"$old_pwd")
|
"$old_pwd") y=$j y2=$((j > bottom ? bottom : j)) cur=$file
|
||||||
y=$j
|
|
||||||
y2=$((j > bottom ? bottom/2 : j))
|
|
||||||
cur=$file
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
j=$((j + 1))
|
j=$((j + 1))
|
||||||
@@ -68,16 +64,11 @@ list_print() {
|
|||||||
end=$((bottom + 1))
|
end=$((bottom + 1))
|
||||||
|
|
||||||
case $hist in
|
case $hist in
|
||||||
1)
|
1) hist_search "$@"
|
||||||
hist_search "$@"
|
|
||||||
shift "$((y >= bottom ? y - (bottom / 2) : 0))"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
shift "$((y >= bottom ? y - bottom : 0))"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
shift "$((y - bottom > 0 ? y - bottom : 0))"
|
||||||
|
|
||||||
for file do
|
for file do
|
||||||
file_escape "$file"
|
file_escape "$file"
|
||||||
|
|
||||||
@@ -92,7 +83,7 @@ list_print() {
|
|||||||
i=$((i + 1))
|
i=$((i + 1))
|
||||||
done
|
done
|
||||||
|
|
||||||
printf '\033[%sH' "$((y > bottom ? y2 : y))"
|
printf '\033[%sH' "$((y > bottom ? bottom : y))"
|
||||||
}
|
}
|
||||||
|
|
||||||
redraw() {
|
redraw() {
|
||||||
|
|||||||
Reference in new issue
Block a user