Cube  Diff

Differences From Artifact [635cf832c8]:

To Artifact [86266db4fd]:


124
125
126
127
128
129
130
131

132
133

134
135
136
137
138
139
140
141
142
143


144
145

146
147
148
149
150
151
152
124
125
126
127
128
129
130

131
132

133
134
135
136
137
138
139
140
141


142
143
144

145
146
147
148
149
150
151
152







-
+

-
+








-
-
+
+

-
+







	}

	conoutf(@"unknown key \"%@\"", key);
}
COMMANDN(bind, bindkey, ARG_2STR)

void
saycommand(const char *init) // turns input to the command line on or off
saycommand(OFString *init) // turns input to the command line on or off
{
	saycommandon = (init != NULL);
	saycommandon = (init != nil);
	if (saycommandon)
		SDL_StartTextInput();
	else
		SDL_StopTextInput();

	if (!editmode)
		Cube.sharedInstance.repeatsKeys = saycommandon;

	if (!init)
		init = "";
	if (init == nil)
		init = @"";

	commandbuf = [[OFMutableString alloc] initWithUTF8String:init];
	commandbuf = [init mutableCopy];
}
COMMAND(saycommand, ARG_VARI)

void
mapmsg(OFString *s)
{
	@autoreleasepool {
251
252
253
254
255
256
257
258

259
260
261
262
263
264
265
251
252
253
254
255
256
257

258
259
260
261
262
263
264
265







-
+







					histpos = vhistory.count;
					if ([commandbuf hasPrefix:@"/"]) {
						std::unique_ptr<char> copy(
						    strdup(
						        commandbuf.UTF8String));
						execute(copy.get(), true);
					} else
						toserver(commandbuf.UTF8String);
						toserver(commandbuf);
				}
				saycommand(NULL);
			} else if (code == SDLK_ESCAPE) {
				saycommand(NULL);
			}
		}
	} else if (!menukey(code, isdown)) {