Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

cmd/ncdu: use negative values for key runes

eNV257672cde4f348
diff --git a/cmd/ncdu/ncdu.go b/cmd/ncdu/ncdu.go
index edf0a570c..f6de22f1a 100644
--- a/cmd/ncdu/ncdu.go
+++ b/cmd/ncdu/ncdu.go
@@ -1032,8 +1032,7 @@ outer:
return nil
}
-// key returns a rune representing the key k. It is larger than the maximum Unicode code-point.
+// key returns a rune representing the key k. It is a negative value, to not collide with Unicode code-points.
func key(k tcell.Key) rune {
- // This is the maximum possible Unicode code point. Anything greater fails to compile as a Go quoted rune literal.
- return '\U0010FFFF' + rune(k)
+ return rune(-k)
}