Skip to content

Closing file without saving changes doesn't discard changes #3550

@jcasale

Description

@jcasale

Environment

  • TeXstudio: 4.7.3
  • Qt: 6.6.2
  • OS: Windows 11
  • TeX distribution: miktex

Expected behavior

After editing a file and then closing it without saving changes, I expect that reopening it loads the original, unsaved version.

Actual behavior

When the file is reopened, the changes are still present despite choosing to discard them.

How to reproduce

My document files are as follows:

  1. document.tex

    \documentclass[letterpaper]{article}
    
    \usepackage[sfdefault]{roboto}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    
    \title{Title}
    \author{Author}
    \date{\today}
    
    \begin{document}
      \maketitle
      \pagebreak
      \tableofcontents
    
      \newpage
      \input{introduction}
    \end{document}
  2. introduction.tex

    \section{Introduction}

After opening the introduction.tex, adding the second and third lines, then closing it without saving and selecting discard, the changes are still present when the file is reopened until restarting texstudio.

Screenshot 2024-03-03 093747

An archive of the document files and a video capture illustrating the behavior is attached.
repro.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions