MCPcopy
hub / github.com/micro-editor/micro / GetName

Method GetName

internal/buffer/buffer.go:539–551  ·  view source on GitHub ↗

GetName returns the name that should be displayed in the statusline for this buffer

()

Source from the content-addressed store, hash-verified

537// GetName returns the name that should be displayed in the statusline
538// for this buffer
539func (b *Buffer) GetName() string {
540 name := b.name
541 if name == "" {
542 if b.Path == "" {
543 return "No name"
544 }
545 name = b.Path
546 }
547 if b.Settings["basename"].(bool) {
548 return filepath.Base(name)
549 }
550 return name
551}
552
553// SetName changes the name for this buffer
554func (b *Buffer) SetName(s string) {

Callers 4

statusline.goFile · 0.80
NameMethod · 0.80
closePromptMethod · 0.80
checkFunction · 0.80

Calls

no outgoing calls

Tested by 1

checkFunction · 0.64