hedgewars/uChat.pas
changeset 11696 fa4bc078e509
parent 11476 c4e1d39acc56
child 11697 446ce60700dd
--- a/hedgewars/uChat.pas	Sun Apr 24 21:16:08 2016 +0200
+++ b/hedgewars/uChat.pas	Sun Apr 24 22:10:37 2016 +0200
@@ -1026,6 +1026,15 @@
         if byte(InputStr.s[0]) + l > 240 then exit;
         s[0]:= char(l);
         InsertIntoInputStr(s);
+
+        // add closing hog speech quotation marks automatically
+        if (l = 1) and (Length(InputStr.s) = 1) and charIsForHogSpeech(s[1]) then
+            begin
+            InsertIntoInputStr(s);
+            MoveCursorToPreviousChar();
+            UpdateCursorCoords();
+            end;
+
         end
 end;