summaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-10-24 19:18:58 +0000
committerBram Moolenaar <Bram@vim.org>2004-10-24 19:18:58 +0000
commit009b2592f7488286f286484b7f389e36fffa4bd9 (patch)
treec73d489697594d2c1216168f9bfb8763caed31f7 /src/undo.c
parent47136d70fafd8b101965b8d3d4bb72f5fe7dc231 (diff)
downloadvim-git-009b2592f7488286f286484b7f389e36fffa4bd9.tar.gz
updated for version 7.0020
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/undo.c b/src/undo.c
index 6efcffab4..bdba903d8 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -185,10 +185,18 @@ u_savecommon(top, bot, newbot)
* Netbeans defines areas that cannot be modified. Bail out here when
* trying to change text in a guarded area.
*/
- if (usingNetbeans && netbeans_is_guarded(top, bot))
+ if (usingNetbeans)
{
- EMSG(_(e_guarded));
- return FAIL;
+ if (netbeans_is_guarded(top, bot))
+ {
+ EMSG(_(e_guarded));
+ return FAIL;
+ }
+ if (curbuf->b_p_ro)
+ {
+ EMSG(_(e_nbreadonly));
+ return FAIL;
+ }
}
#endif
@@ -693,6 +701,10 @@ u_undoredo()
if (old_flags & UH_CHANGED)
changed();
else
+#ifdef FEAT_NETBEANS_INTG
+ /* per netbeans undo rules, keep it as modified */
+ if (!isNetbeansModified(curbuf))
+#endif
unchanged(curbuf, FALSE);
/*