OSDN Git Service

二語前の取得時、カーソル位置の計算が間違っていた
authortnishi <tnishi@git.osdn.net>
Thu, 15 Dec 2016 02:19:36 +0000 (11:19 +0900)
committertnishi <tnishi@git.osdn.net>
Thu, 15 Dec 2016 02:19:36 +0000 (11:19 +0900)
amodi/amodi/MainForm.cs

index 37233ab..36953dc 100644 (file)
@@ -173,10 +173,11 @@ namespace amodi
                                        if (prevWord.Length != 0) {
                                                                                if (NumPrevWords >= 2 && prevWord2.Length != 0){
                                                                                        tbText.AppendText(prevWord2 + " " + prevWord + " ");
+                                            CurLoc = prevWord2.Length + 1 + prevWord.Length + 1;
                                                                                } else {
                                                    tbText.AppendText(prevWord + " ");
-                                               }
-                                           CurLoc = prevWord.Length + 1;
+                                            CurLoc = prevWord.Length + 1;
+                                        }
                                        }
                                 } else {
                                                                        prevWord2 = prevWord;