mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-04-25 07:50:54 +02:00
improved content right shift logic
This commit is contained in:
parent
1ac279d6d7
commit
701e357d87
@ -31,13 +31,14 @@ String rightShiftContent(String s, int numSpaces) {
|
||||
|
||||
for(int i = 0; i < s.length; i++) {
|
||||
if( s[i] == '\n') {
|
||||
newlineCounter = 0;
|
||||
newString += "\n";
|
||||
newString += spacesString;
|
||||
newlineCounter = 0;
|
||||
} else {
|
||||
if( newlineCounter == (screenWidth - numSpaces)) {
|
||||
if( newlineCounter >= (screenWidth - numSpaces)) {
|
||||
newString += "\n";
|
||||
newString += spacesString;
|
||||
newlineCounter = 0;
|
||||
}
|
||||
|
||||
newString += s[i];
|
||||
|
Loading…
x
Reference in New Issue
Block a user