{"thread":{"id":"15716","subject":"[PATCH] git-gui: Remove space from the end of aspell's reply before processing","startedAt":"2008-09-30T06:39:29Z","lastAt":"2008-09-30T06:39:29Z","messageCount":1,"participants":["Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"91896","messageId":"48E1C9A1.2090409@viscovery.net","threadId":"15716","inReplyTo":null,"subject":"[PATCH] git-gui: Remove space from the end of aspell's reply before processing","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-09-30T06:39:29Z","receivedAt":"2008-09-30T06:39:29Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"From: Johannes Sixt <johannes.sixt@telecom.at>\n\nWhen git gui processes a reply from aspell it explicitly ignores an empty\nline. The Windows version of aspell, however, terminates lines with CRLF,\nbut TCL's 'gets' does not remove CR, hence, a \"visibly\" empty line was not\nactually recognized as empty. With this change we explicitly trim off\nwhitespace before the line is further processed.\n\nSigned-off-by: Johannes Sixt <johannes.sixt@telecom.at>\n---\n There's probably a better solution by having TCL do the translation of\n line endings, but I don't know how to do that.\n\n -- Hannes\n\n lib/spellcheck.tcl |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/lib/spellcheck.tcl b/lib/spellcheck.tcl\nindex a479b2f..e612030 100644\n--- a/lib/spellcheck.tcl\n+++ b/lib/spellcheck.tcl\n@@ -314,6 +314,7 @@ method _run {} {\n method _read {} {\n \twhile {[gets $s_fd line] >= 0} {\n \t\tset lineno [lindex $s_pending 0 0]\n+\t\tset line [string trim $line]\n\n \t\tif {$s_clear} {\n \t\t\t$w_text tag remove misspelled \"$lineno.0\" \"$lineno.end\"\n-- \n1.6.0.2.1262.ge466e\n"}]}