]> git.lizzy.rs Git - micro.git/commitdiff
Show that the file is readonly (#1486)
authorRein F <public@reinfernhout.xyz>
Sun, 9 Feb 2020 00:34:35 +0000 (01:34 +0100)
committerGitHub <noreply@github.com>
Sun, 9 Feb 2020 00:34:35 +0000 (19:34 -0500)
* Show that the file is readonly)

* change the (readonly) statusline msg into [ro]

internal/display/statusline.go

index c139c8c6ab46f16af930fecc62b8f8632319a5a0..c55be9885e0668a6c880161a373ef3266aae73ee 100644 (file)
@@ -47,6 +47,9 @@ var statusInfo = map[string]func(*buffer.Buffer) string{
                if b.Modified() {
                        return "+ "
                }
+               if b.Type.Readonly {
+                       return "[ro] "
+               }
                return ""
        },
 }