diff --git a/lib/nostr_console_ds.dart b/lib/nostr_console_ds.dart index 983aa74..4447937 100644 --- a/lib/nostr_console_ds.dart +++ b/lib/nostr_console_ds.dart @@ -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];