diff --git a/routers/repo/editor.go b/routers/repo/editor.go index f91ce1b462..6a3f379f6a 100644 --- a/routers/repo/editor.go +++ b/routers/repo/editor.go @@ -184,6 +184,7 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo } ctx.Data["PageIsEdit"] = true + ctx.Data["PageHasPosted"] = true ctx.Data["IsNewFile"] = isNewFile ctx.Data["RequireHighlightJS"] = true ctx.Data["RequireSimpleMDE"] = true diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl index af65813b33..db012728e7 100644 --- a/templates/repo/editor/edit.tmpl +++ b/templates/repo/editor/edit.tmpl @@ -6,6 +6,7 @@