jcasale · GitHub

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

Read the original on github.com ↗