| @@ 227-236 (lines=10) @@ | ||
| 224 | ||
| 225 | # 現在検索ボックスに入力されてる文字 |
|
| 226 | now_text = self.text_var.get() |
|
| 227 | if not now_text: |
|
| 228 | # 空欄だったら処理しない |
|
| 229 | pass |
|
| 230 | elif now_text != self.find_text: |
|
| 231 | # 前回の入力と違う文字なら、検索を最初から行う |
|
| 232 | index = 'end' |
|
| 233 | self.search_next(now_text, index, 2) |
|
| 234 | else: |
|
| 235 | # 前回の入力と同じなら、検索の続きを行う |
|
| 236 | self.search_next(now_text, self.next_pos, 2) |
|
| 237 | ||
| 238 | # 今回の入力を、「前回入力文字」にする |
|
| 239 | self.find_text = now_text |
|
| @@ 161-170 (lines=10) @@ | ||
| 158 | ||
| 159 | # 現在検索ボックスに入力されてる文字 |
|
| 160 | now_text = self.text_var.get() |
|
| 161 | if not now_text: |
|
| 162 | # 空欄だったら処理しない |
|
| 163 | pass |
|
| 164 | elif now_text != self.find_text: |
|
| 165 | # 前回の入力と違う文字なら、検索を最初から行う |
|
| 166 | index = '0.0' |
|
| 167 | self.search_next(now_text, index, 0) |
|
| 168 | else: |
|
| 169 | # 前回の入力と同じなら、検索の続きを行う |
|
| 170 | self.search_next(now_text, self.next_pos, 1) |
|
| 171 | ||
| 172 | # 今回の入力を、「前回入力文字」にする |
|
| 173 | self.find_text = now_text |
|