diff --git a/README.txt b/README.txt index e3015d74..f940af16 100644 --- a/README.txt +++ b/README.txt @@ -106,6 +106,7 @@ Known issues: 3. Regular expression which relies on characters before/after the matched string, Eg. (?<=.)\s(?=.), will has issue to be replaced one by one. It's tricky and NP++ has the same issue too. +4. HighlightWord would not work if the caret is at the end of the line Feature/issues to be released ----------------------------- diff --git a/scripts/insertlines.mpy b/scripts/insertlines.mpy new file mode 100644 index 00000000..3f0060e1 --- /dev/null +++ b/scripts/insertlines.mpy @@ -0,0 +1,23 @@ +#Create MadEdit Object for the active edit +medit = MadEdit() + +newline = '\r' +if medit.GetInsertNewLineType() == MadNewLineType.DOS: + newline += '\n' +elif medit.GetInsertNewLineType() == MadNewLineType.Unix: + newline = '\n' + +result = InputBox("Please input how many lines you want to insert:", "Input lines") +try: + num = int(result) + if num > 0: + lines = newline * num + medit.InsertStr(lines) + else : + MsgBox("Input Wrong numbers", "ERROR", MadDlgStyle.ICON_ERROR_HAND_STOP | MadDlgStyle.OK) +except: + MsgBox("Input Wrong numbers", "ERROR", MadDlgStyle.ICON_ERROR_HAND_STOP | MadDlgStyle.OK) + +print '====' +print lines +print '====' \ No newline at end of file diff --git a/src/MadEdit/MadEdit.cpp b/src/MadEdit/MadEdit.cpp index e0b0e1de..481c0710 100644 --- a/src/MadEdit/MadEdit.cpp +++ b/src/MadEdit/MadEdit.cpp @@ -896,7 +896,7 @@ MadEdit::MadEdit( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxS m_SpellCheck = false; m_BookmarkInSearch = false; m_TypewriterMode = m_Config->ReadBool( wxT( "TypewriterMode" ), false ); - m_LDClickHighlight = m_Config->ReadBool( wxT( "LDoubleClickHighlight" ), true ); + m_LDClickHighlight = m_Config->ReadBool( wxT( "LDoubleClickHighlight" ), true ); m_HasBackup = true; #ifndef PYMADEDIT_DLL m_Config->Read( wxT( "SpellCheck" ), &m_SpellCheck, true );