mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-11 23:22:41 +09:00
Add termtitle option and move autoclose utf8 code
This commit is contained in:
@@ -198,6 +198,7 @@ func DefaultGlobalSettings() map[string]interface{} {
|
||||
"syntax": true,
|
||||
"tabsize": float64(4),
|
||||
"tabstospaces": false,
|
||||
"termtitle": false,
|
||||
"pluginchannels": []string{
|
||||
"https://raw.githubusercontent.com/micro-editor/plugin-channel/master/channel.json",
|
||||
},
|
||||
|
||||
@@ -931,7 +931,9 @@ func (v *View) DisplayCursor(x, y int) {
|
||||
|
||||
// Display renders the view, the cursor, and statusline
|
||||
func (v *View) Display() {
|
||||
screen.SetTitle("micro: " + v.Buf.GetName())
|
||||
if GetGlobalOption("termtitle").(bool) {
|
||||
screen.SetTitle("micro: " + v.Buf.GetName())
|
||||
}
|
||||
v.DisplayView()
|
||||
// Don't draw the cursor if it is out of the viewport or if it has a selection
|
||||
if (v.Cursor.Y-v.Topline < 0 || v.Cursor.Y-v.Topline > v.Height-1) || v.Cursor.HasSelection() {
|
||||
|
||||
@@ -146,6 +146,10 @@ Here are the options that you can set:
|
||||
|
||||
default value: `off`
|
||||
|
||||
* `termtitle`: defines whether or not your terminal's title will be set by micro when opened.
|
||||
|
||||
default value: `off`
|
||||
|
||||
---
|
||||
|
||||
Default plugin options:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user