Skip to content

Commit

Permalink
Fix scroll limit 100 after shell reset.
Browse files Browse the repository at this point in the history
Increments-patch-version-of: other
  • Loading branch information
dajofrey committed Jan 25, 2024
1 parent 7da82f6 commit c633a8b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
1 change: 0 additions & 1 deletion external/st-0.8.5/st.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,6 @@ treset(ST *st)
st->history = NULL;
st->close = 0;
st->scrollup = 0;
st->maxScrollup = 100;
st->bot = st->row - 1;
st->mode = TERM_MODE_WRAP|TERM_MODE_UTF8;
memset(st->trantbl, CS_USA, sizeof(st->trantbl));
Expand Down
31 changes: 31 additions & 0 deletions scripts/prepare-commit-msg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

# Declare an empty array
files_to_process=()
other=false

# Run 'git diff --staged --name-only' and process each line
while IFS= read -r line; do
# Check if the line contains the substring "src/lib/ttyr"
if [[ $line == *src/lib/ttyr* ]]; then
# Add the line to the array
files_to_process+=("$line")
else
other=true
fi
done < <(git diff --staged --name-only)

Expand Down Expand Up @@ -72,6 +75,34 @@ for unique_file in "${unique_files[@]}"; do
done
done

if other
echo -e "\nWorkload in: other"
echo "Workload scope options:"
for option in "${workload_options[@]}"; do
echo "$option"
done

while true; do
read -p "Workload scope? (1-4): " workload_input
case $workload_input in
1|2|3|4)
case $workload_input in
1) workload_scope="patch" ;;
2) workload_scope="minor" ;;
3) workload_scope="major" ;;
4) workload_scope="api" ;;
esac
echo "Selected workload scope: $workload_scope"
actions+=("Increments-${workload_scope}-version-of: other")
break
;;
*)
echo "Invalid input. Please enter a number from 1 to 4."
;;
esac
done
fi

# Print the actions array
echo -e "\nResult:"
for action in "${actions[@]}"; do
Expand Down

0 comments on commit c633a8b

Please sign in to comment.