mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-20 01:11:18 +00:00
[qwaq] Hold the editor filename
It may be an ephemeral string.
This commit is contained in:
parent
2bec2527b4
commit
6291a3c503
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
#include <QF/keys.h>
|
||||
#include <string.h>
|
||||
#include "qwaq-app.h"
|
||||
#include "editor/editor.h"
|
||||
#include "ui/listener.h"
|
||||
|
@ -11,7 +12,7 @@
|
|||
if (!(self = [super initWithRect: rect])) {
|
||||
return nil;
|
||||
}
|
||||
self.filename = filename;
|
||||
self.filename = str_hold (filename);
|
||||
buffer = [[EditBuffer withFile:filename] retain];
|
||||
line_count = [buffer countLines: {0, [buffer textSize]}];
|
||||
linebuffer = [[DrawBuffer buffer: { xlen, 1 }] retain];
|
||||
|
@ -28,6 +29,7 @@
|
|||
|
||||
-(void)dealloc
|
||||
{
|
||||
str_free (filename);
|
||||
[vScrollBar release];
|
||||
[buffer release];
|
||||
[linebuffer release];
|
||||
|
|
Loading…
Reference in a new issue