mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Disable ‘document did save’ callback
This commit is contained in:
@@ -572,8 +572,9 @@ static std::string shell_quote (std::vector<std::string> paths)
|
||||
if(window != self.window)
|
||||
return;
|
||||
|
||||
citerate(item, bundles::query(bundles::kFieldSemanticClass, "callback.document.did-save", [self scopeContext]))
|
||||
[self performBundleItem:*item];
|
||||
NSLog(@"%s %@ is modified: %s", sel_getName(_cmd), [NSString stringWithCxxString:document->display_name()], BSTR(document->is_modified()));
|
||||
for(auto item : bundles::query(bundles::kFieldSemanticClass, "callback.document.did-save", [self scopeContext]))
|
||||
NSLog(@"%s skip ‘%@’", sel_getName(_cmd), [NSString stringWithCxxString:item->full_name()]);
|
||||
}
|
||||
|
||||
- (void)reflectDocumentSize
|
||||
|
||||
@@ -589,6 +589,7 @@ namespace document
|
||||
|
||||
void document_t::post_save (std::string const& path, io::bytes_ptr content, encoding::type const& encoding, bool success)
|
||||
{
|
||||
fprintf(stderr, "saved ‘%s’ successfully %s\n", path.c_str(), BSTR(success));
|
||||
if(success)
|
||||
{
|
||||
_key = documents.update_path(shared_from_this(), _key, path::identifier_t(_path));
|
||||
@@ -603,7 +604,9 @@ namespace document
|
||||
_disk_bom = encoding.byte_order_mark();
|
||||
_disk_newlines = encoding.newlines();
|
||||
|
||||
bool oldModified = is_modified();
|
||||
check_modified(revision(), revision());
|
||||
fprintf(stderr, "modified %s → %s\n", BSTR(oldModified), BSTR(is_modified()));
|
||||
mark_pristine();
|
||||
broadcast(callback_t::did_save);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user