Code Duplication    Length = 10-10 lines in 2 locations

source/novel_editor.py 2 locations

@@ 1681-1690 (lines=10) @@
1678
1679
        # 現在検索ボックスに入力されてる文字
1680
        now_text = self.text_var.get()
1681
        if not now_text:
1682
            # 空欄だったら処理しない
1683
            pass
1684
        elif now_text != self.last_text:
1685
            # 前回の入力と違う文字なら、検索を最初から行う
1686
            index = 'end'
1687
            self.search_next(now_text, index, 2)
1688
        else:
1689
            # 前回の入力と同じなら、検索の続きを行う
1690
            self.search_next(now_text, self.next_pos, 2)
1691
1692
        # 今回の入力を、「前回入力文字」にする
1693
        self.last_text = now_text
@@ 1615-1624 (lines=10) @@
1612
1613
        # 現在検索ボックスに入力されてる文字
1614
        now_text = self.text_var.get()
1615
        if not now_text:
1616
            # 空欄だったら処理しない
1617
            pass
1618
        elif now_text != self.last_text:
1619
            # 前回の入力と違う文字なら、検索を最初から行う
1620
            index = '0.0'
1621
            self.search_next(now_text, index, 0)
1622
        else:
1623
            # 前回の入力と同じなら、検索の続きを行う
1624
            self.search_next(now_text, self.next_pos, 1)
1625
1626
        # 今回の入力を、「前回入力文字」にする
1627
        self.last_text = now_text