aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 17ac1687a..9ec5994f9 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -3781,6 +3781,10 @@ void Editor::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) {
}
NotifyChar(byte);
}
+
+ if (recordingMacro) {
+ NotifyMacroRecord(SCI_REPLACESEL, 0, reinterpret_cast<sptr_t>(s));
+ }
}
void Editor::ClearSelection() {
@@ -4019,12 +4023,6 @@ void Editor::NotifyChar(int ch) {
scn.nmhdr.code = SCN_CHARADDED;
scn.ch = ch;
NotifyParent(scn);
- if (recordingMacro) {
- char txt[2];
- txt[0] = static_cast<char>(ch);
- txt[1] = '\0';
- NotifyMacroRecord(SCI_REPLACESEL, 0, reinterpret_cast<sptr_t>(txt));
- }
}
void Editor::NotifySavePoint(bool isSavePoint) {
@@ -4584,6 +4582,12 @@ void Editor::NewLine() {
SetEmptySelection(sel.MainCaret() + istrlen(eol));
while (*eol) {
NotifyChar(*eol);
+ if (recordingMacro) {
+ char txt[2];
+ txt[0] = *eol;
+ txt[1] = '\0';
+ NotifyMacroRecord(SCI_REPLACESEL, 0, reinterpret_cast<sptr_t>(txt));
+ }
eol++;
}
}