Commit 42536d58 authored by Kevin Lyda's avatar Kevin Lyda
Browse files

Bug fixes from a claude code review

parent 8225d9ae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -152,7 +152,7 @@ func PrefixMatch(command string, commands []string) (string, error) {
	cmd := strings.ToUpper(command)
	possibles := []string{}
	for i := range commands {
		if strings.HasPrefix(cmd, commands[i]) {
		if strings.HasPrefix(commands[i], cmd) {
			possibles = append(possibles, commands[i])
		}
	}
+0 −1
Original line number Diff line number Diff line
@@ -466,7 +466,6 @@ func ActionNext(_ *dclish.Command) error {
	if err != nil {
		return err
	}
	pager.Pager(msg.String())
	if pager.Pager(msg.String()) {
		if err := folders.MarkSeen([]int64{msgid}); err != nil {
			return err
+1 −1
Original line number Diff line number Diff line
@@ -226,5 +226,5 @@ func ActionSetNosystem(_ *dclish.Command) error {
		return nil
	}
	ctx := storage.Context()
	return this.Q.UpdateFolderSystem(ctx, 1, this.Folder.Name)
	return this.Q.UpdateFolderSystem(ctx, 0, this.Folder.Name)
}
+2 −2
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ func ActionShowFolder(cmd *dclish.Command) error {
	}
	if folder.Name == "" {
		fmt.Println("ERROR: Specified folder was not found.")
		return nil
	}

	full := false
@@ -131,7 +132,6 @@ func ActionShowUser(cmd *dclish.Command) error {
	}
	folder := this.Folder
	if cmd.Flags["/FOLDER"].Set {
		fmt.Printf("%v\n", cmd.Flags["/FOLDER"].Value)
		if cmd.Flags["/FOLDER"].Value != "" {
			folder = folders.FindFolder(cmd.Flags["/FOLDER"].Value)
			if folder.Name == "" {
@@ -227,6 +227,6 @@ func ActionShowVersion(_ *dclish.Command) error {
	}
	fmt.Printf("BULLETIN Version 2.0.7g (%s)\n", rev)
	fmt.Printf("Linked on %s\n",
		versioninfo.LastCommit.Format("2006-05-04 15:02:01"))
		versioninfo.LastCommit.Format("2006-01-02 15:04:05"))
	return nil
}
+2 −2
Original line number Diff line number Diff line
@@ -449,7 +449,7 @@ SELECT id, folder, author, subject, message, permanent, system, shutdown, expira
    AND subject = ?
    AND id <= ?
    AND folder = ?
  ORDER BY DESC
  ORDER BY id DESC
`

type SearchReplyReverseParams struct {
@@ -467,7 +467,7 @@ type SearchReplyReverseParams struct {
//	    AND subject = ?
//	    AND id <= ?
//	    AND folder = ?
//	  ORDER BY DESC
//	  ORDER BY id DESC
func (q *Queries) SearchReplyReverse(ctx context.Context, arg SearchReplyReverseParams) ([]Message, error) {
	rows, err := q.db.QueryContext(ctx, searchReplyReverse,
		arg.Column1,
Loading