Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
bff259fd
Commit
bff259fd
authored
Jan 31, 2017
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
General: Fix prompt height when color blocks are disabled in config
parent
b4e5169a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
neofetch
neofetch
+9
-6
No files found.
neofetch
View file @
bff259fd
...
...
@@ -1949,22 +1949,22 @@ get_cols() {
done
# Convert height into spaces.
printf -v spaces "%${block_height}s"
printf -v
block_
spaces "%${block_height}s"
# Convert the spaces into rows of blocks.
[[ "$blocks" ]] && cols+="${spaces// /${blocks}${reset}nl}"
[[ "$blocks2" ]] && cols+="${spaces// /${blocks2}${reset}nl}"
[[ "$blocks" ]] && cols+="${
block_
spaces// /${blocks}${reset}nl}"
[[ "$blocks2" ]] && cols+="${
block_
spaces// /${blocks2}${reset}nl}"
# Add newlines to the string.
cols="${cols%%'
nl
'}"
cols="${cols//nl/\\n\\033[${text_padding}C${zws}}"
# Add block height to info height.
info_height="$((info_height+=block_height+2))"
printf "%b\n" "\033[${text_padding}C${zws}${cols}"
else
printf "\n"
fi
info_height="$((info_height+=block_height+2))"
unset -v blocks blocks2 cols
# Tell info() that we printed manually.
...
...
@@ -3517,6 +3517,9 @@ dynamic_prompt() {
lines="
$((
lines
-
info_height
))
"
fi
# Print a newline if color blocks are disabled.
[[ -z "
$block_spaces
" ]] && printf "
\n
"
# Set the prompt location.
((lines > 0)) && printf "
%b
" "
\0
33[
${
lines
}
B
"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment