Commit 49f203c9 authored by minicom's avatar minicom
Browse files

Revert "Restore full-width character processing code"

This reverts commit b64e41c6.
parent 83891164
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -192,19 +192,7 @@ class SourceTextEdit(QTextEdit):
                    input_method_used = True
                    self.input_method_from = -1
                elif self.change_added > 0:
                    text = self.toPlainText()
                    len_text = len(text)
                    cursor = self.textCursor()
                    
                    if self.change_added >  len_text or change_from + self.change_added > len_text:
                        self.change_added = 1
                        change_from = self.textCursor().position() - 1
                        cursor.setPosition(change_from)
                        cursor.setPosition(change_from + self.change_added, QTextCursor.MoveMode.KeepAnchor)
                        added_text = cursor.selectedText()
                        if added_text == '' or added_text == '':
                                self.change_added = 2
                                change_from -= 1
                    cursor.setPosition(change_from)
                    cursor.setPosition(change_from + self.change_added, QTextCursor.MoveMode.KeepAnchor) 
                    added_text = cursor.selectedText()
+0 −18
Original line number Diff line number Diff line
@@ -102,25 +102,7 @@ class TextBlkItem(QGraphicsTextItem):
                        self.input_method_from = -1

                    elif self.change_added > 0:
                        len_text = len(self.toPlainText())
                        cursor = self.textCursor()
                        
                        # if self.change_added >  len_text:
                        #     self.change_added = 1
                        #     change_from = self.textCursor().position() - 1
                        #     input_method_used = True
                        # cursor.setPosition(change_from)
                        # cursor.setPosition(change_from + self.change_added, QTextCursor.MoveMode.KeepAnchor)
                        if self.change_added >  len_text or change_from + self.change_added > len_text:
                            self.change_added = 1
                            change_from = self.textCursor().position() - 1
                            cursor.setPosition(change_from)
                            cursor.setPosition(change_from + self.change_added, QTextCursor.MoveMode.KeepAnchor)
                            added_text = cursor.selectedText()
                            if added_text == '' or added_text == '':
                                    self.change_added = 2
                                    change_from -= 1
                                    
                        cursor.setPosition(change_from)
                        cursor.setPosition(change_from + self.change_added, QTextCursor.MoveMode.KeepAnchor)