[geany/geany-plugins] 0937a9: GeanyPG: Wrap consecutive Scintilla calls inside a undo action
Colomban Wendling
git-noreply at xxxxx
Sun Jul 8 13:25:14 UTC 2012
Branch: refs/heads/1.22_release
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Sun, 08 Jul 2012 13:25:14
Commit: 0937a91ba36e8b4af1b32ffb6b401d2b7f2365c1
https://github.com/geany/geany-plugins/commit/0937a91ba36e8b4af1b32ffb6b401d2b7f2365c1
Log Message:
-----------
GeanyPG: Wrap consecutive Scintilla calls inside a undo action
Modified Paths:
--------------
geanypg/src/helper_functions.c
Modified: geanypg/src/helper_functions.c
2 files changed, 2 insertions(+), 0 deletions(-)
===================================================================
@@ -161,6 +161,7 @@ void geanypg_write_file(FILE * file)
unsigned long size;
char buffer[BUFSIZE] = {0};
GeanyDocument * doc = document_get_current();
+ sci_start_undo_action(doc->editor->sci);
if (sci_has_selection(doc->editor->sci))
{ /* replace selected text
* clear selection, cursor should be at the end or beginneng of the selection */
@@ -175,6 +176,7 @@ void geanypg_write_file(FILE * file)
while ((size = fread(buffer, 1, BUFSIZE, file)))
scintilla_send_message(doc->editor->sci, SCI_APPENDTEXT, (uptr_t) size, (sptr_t) buffer);
}
+ sci_end_undo_action(doc->editor->sci);
#undef BUFSIZE
}
@@ Diff output truncated at 100000 characters. @@
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
More information about the Plugins-Commits
mailing list