Skip to content

Conversation

@kolcz
Copy link
Contributor

@kolcz kolcz commented Jul 5, 2025

Description

This PR addresses issue #702. In this PR I added prompt dialog to reload file buffer or keep buffer unchanged when file is edited externally.

Changes Made

  • Added message box with prompt,
  • Added function omitModifications in which modifiedTime is updated to file info last modified time and temporary flag is set,
  • Added setting temporary flag to false after reload. This changes temporary flag when changes are ommited and then reloaded,
  • Added signal ScintillaNext::modified to URLFinder to findURL after file reload.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change
  • Documentation update

Testing - on Windows 11 and Debian 12 bookworm

  • If file is modified externally and NotepadNext gets focus prompt dialog is shown,
  • If "Yes" option is selected file is reloaded,
  • If "No" option is selected file keep current content and file icon is changed to red
  • If "No" option is selected after hiding window and showing it again prompt dialog isn't shown,
  • If "No" option is firstly selected and then file is modified again propmt dialog is shown again,
  • If file icon is red and gets reloaded it changes,
  • If file is reloaded links are highlighted.

Additional Note

This is my first contribution to this project.

@kolcz kolcz marked this pull request as draft July 5, 2025 21:51
@kolcz
Copy link
Contributor Author

kolcz commented Jul 6, 2025

@dail8859 could you check if everything is ok with runners? I builded code on my fork and all checks passed (kolcz#2). I'm not sure, but runner time limit could be exceeded. I can try to commit and reverse some changes to re-run build workflows, but could you first check it?

@kolcz kolcz requested a review from dail8859 July 9, 2025 17:19
@kolcz kolcz marked this pull request as ready for review July 9, 2025 17:20
@dail8859 dail8859 linked an issue Jul 10, 2025 that may be closed by this pull request
@dail8859 dail8859 merged commit 2777659 into dail8859:master Jul 10, 2025
12 checks passed
@dail8859
Copy link
Owner

@kolcz Appreciate your time and effort and working through these changes! ❤️

@kolcz kolcz deleted the modified_file_reload_dialog branch July 10, 2025 09:01
matthewyang204 pushed a commit to matthewyang204/NotepadNext that referenced this pull request Dec 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File that currently has focus does not update when changed externally

2 participants