mirror of
https://github.com/Hopiu/micro.git
synced 2026-04-03 14:40:37 +00:00
Add termtitle option and move autoclose utf8 code
This commit is contained in:
parent
aed8ba105a
commit
2a3ce12bd4
4 changed files with 1052 additions and 2 deletions
|
|
@ -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
Loading…
Reference in a new issue