You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Added patch to make sure Notepad creates new files immediately.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
From 391fff4e34db1ea266bf5abcfffb81f0ce127eb7 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 22 Aug 2015 21:59:22 +0200
|
||||
Subject: notepad: Make sure new files are created immediately.
|
||||
|
||||
---
|
||||
programs/notepad/main.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/programs/notepad/main.c b/programs/notepad/main.c
|
||||
index 480f866..20e887b 100644
|
||||
--- a/programs/notepad/main.c
|
||||
+++ b/programs/notepad/main.c
|
||||
@@ -702,9 +702,18 @@ static void HandleCommandLine(LPWSTR cmdline)
|
||||
{
|
||||
switch (AlertFileDoesNotExist(file_name)) {
|
||||
case IDYES:
|
||||
+ {
|
||||
+
|
||||
+ HANDLE file;
|
||||
SetFileNameAndEncoding(file_name, ENCODING_ANSI);
|
||||
+
|
||||
+ file = CreateFileW(file_name, GENERIC_WRITE, FILE_SHARE_WRITE,
|
||||
+ NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
+ if (file != INVALID_HANDLE_VALUE) CloseHandle(file);
|
||||
+
|
||||
UpdateWindowCaption();
|
||||
break;
|
||||
+ }
|
||||
|
||||
case IDNO:
|
||||
break;
|
||||
--
|
||||
2.5.0
|
||||
|
||||
1
patches/notepad-New_File/definition
Normal file
1
patches/notepad-New_File/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [19425] Notepad should create new files immediately
|
||||
Reference in New Issue
Block a user