Add termtitle option and move autoclose utf8 code

This commit is contained in:
Zachary Yedidia
2017-04-29 16:01:09 -04:00
parent aed8ba105a
commit 2a3ce12bd4
4 changed files with 1052 additions and 2 deletions

View File

@@ -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",
},

View File

@@ -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() {

View File

@@ -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