public void EndReplace() { if (document != null) { Gtk.Application.Invoke(delegate { document.Editor.Document.EndAtomicUndo(); document.Editor.Document.CommitUpdateAll(); }); return; } if (buffer != null && somethingReplaced) { object attributes = DesktopService.GetFileAttributes(FileName); File.WriteAllText(FileName, buffer.ToString()); DesktopService.SetFileAttributes(FileName, attributes); } buffer = null; }
public virtual void EndReplace() { if (document != null) { Gtk.Application.Invoke((o, args) => { if (undoGroup != null) { undoGroup.Dispose(); undoGroup = null; } /*document.Editor.Document.CommitUpdateAll (); */ }); return; } if (buffer != null && somethingReplaced) { object attributes = DesktopService.GetFileAttributes(FileName); TextFileUtility.WriteText(FileName, buffer.ToString(), encoding ?? Encoding.UTF8); DesktopService.SetFileAttributes(FileName, attributes); } buffer = null; }
public void EndReplace() { if (document != null) { Gtk.Application.Invoke(delegate { if (undoGroup != null) { undoGroup.Dispose(); undoGroup = null; } /*document.Editor.Document.CommitUpdateAll (); */ }); return; } if (buffer != null && somethingReplaced) { object attributes = DesktopService.GetFileAttributes(FileName); TextFileUtility.WriteText(FileName, buffer.ToString(), encoding, hadBom); DesktopService.SetFileAttributes(FileName, attributes); } FileService.NotifyFileChanged(FileName); buffer = null; }