Skip to content

Commit

Permalink
Merge pull request #328 from cogentcore/not-saved
Browse files Browse the repository at this point in the history
use core IsNotSaved()
  • Loading branch information
kkoreilly authored Jul 24, 2024
2 parents 98a433b + 7af18bd commit 5e721d8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion code/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ func (cv *Code) SaveAllOpenNodes() {
if ond.Buffer == nil {
continue
}
if ond.Buffer.NotSaved {
if ond.Buffer.IsNotSaved() {
ond.Buffer.Save()
cv.RunPostCmdsFileNode(ond)
}
Expand Down
2 changes: 1 addition & 1 deletion code/texteditors.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (cv *Code) UpdateTextButtons() {
txnm := "<no file>"
if tv.Buffer != nil {
txnm = fsx.DirAndFile(string(tv.Buffer.Filename))
if tv.Buffer.NotSaved {
if tv.Buffer.IsNotSaved() {
txnm += " <b>*</b>"
} else {
txnm += " "
Expand Down
2 changes: 1 addition & 1 deletion code/views.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func (cv *Code) UpdateStatusText() {
ch = tv.CursorPos.Ch
if tv.Buffer != nil {
fnm = cv.Files.RelativePathFrom(tv.Buffer.Filename)
if tv.Buffer.NotSaved {
if tv.Buffer.IsNotSaved() {
fnm += "*"
}
if tv.Buffer.Info.Known != fileinfo.Unknown {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module cogentcore.org/cogent
go 1.22

require (
cogentcore.org/core v0.2.4-0.20240723213451-aa223368e253
cogentcore.org/core v0.2.4-0.20240724045046-9f359945c830
github.com/aandrew-me/tgpt/v2 v2.7.2
github.com/alecthomas/chroma/v2 v2.13.0
github.com/bogdanfinn/fhttp v0.5.27
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cogentcore.org/core v0.2.4-0.20240723213451-aa223368e253 h1:tcW5aSO8bdxnCFWfUlRtt+G7wQ7WJvD78z0QvpqLJDY=
cogentcore.org/core v0.2.4-0.20240723213451-aa223368e253/go.mod h1:Rs73REPCpU/Deh9HOrAwq5cbSSwLvtNEAZJZixSKpcs=
cogentcore.org/core v0.2.4-0.20240724045046-9f359945c830 h1:hgQXPNSswk9YUvgBkCukBgFf/thYzRtZUXZc8Px1Kr4=
cogentcore.org/core v0.2.4-0.20240724045046-9f359945c830/go.mod h1:Rs73REPCpU/Deh9HOrAwq5cbSSwLvtNEAZJZixSKpcs=
github.com/Bios-Marcel/wastebasket v0.0.4-0.20240213135800-f26f1ae0a7c4 h1:6lx9xzJAhdjq0LvVfbITeC3IH9Fzvo1aBahyPu2FuG8=
github.com/Bios-Marcel/wastebasket v0.0.4-0.20240213135800-f26f1ae0a7c4/go.mod h1:FChzXi1izqzdPb6BiNZmcZLGyTYiT61iGx9Rxx9GNeI=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
Expand Down

0 comments on commit 5e721d8

Please sign in to comment.