crash.software
Projects
Pull Requests
Issues
Builds
fzf
Code
Files
Commits
Branches
Tags
Pull Requests
Code Comments
Code Compare
Issues
List
Boards
Milestones
Builds
Statistics
Contributions
Source Lines
Child Projects
Projects
STRLCPY
fzf
Commits
f5027251
🤬
Sign In
Fix slice bound error on extremely narrow screen
Junegunn Choi
committed
3 years ago
f5027251
1 parent
b62a74b3
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
Total 1 files
■
■ ■ ■ ■ ■
src/terminal.go
skipped 1115 lines
1116
1116
}
1117
1117
1118
1118
func (t *Terminal) trimLeft(runes []rune, width int) ([]rune, int32) {
1119
+
width = util.Max(0, width)
1119
1120
var trimmed int32
1120
1121
// Assume that each rune takes at least one column on screen
1121
1122
if len(runes) > width {
skipped 1512 lines
All occurrences
Please wait...
Page is in error, reload to recover