Import Tk 8.6.12

This commit is contained in:
Steve Dower
2021-11-08 17:28:57 +00:00
parent 070b8750b0
commit c6710de848
290 changed files with 5626 additions and 3660 deletions

View File

@@ -1191,7 +1191,7 @@ TkSelInit(
* Using UTF8_STRING instead of the XA_UTF8_STRING macro allows us to
* support older X servers that didn't have UTF8_STRING yet. This is
* necessary on Unix systems. For more information, see:
* http://www.cl.cam.ac.uk/~mgk25/unicode.html#x11
* https://www.cl.cam.ac.uk/~mgk25/unicode.html#x11
*/
#if !defined(_WIN32)
@@ -1325,7 +1325,7 @@ HandleTclCommand(
char *buffer, /* Place to store converted selection. */
int maxBytes) /* Maximum # of bytes to store at buffer. */
{
CommandInfo *cmdInfoPtr = clientData;
CommandInfo *cmdInfoPtr = (CommandInfo *)clientData;
int length;
Tcl_Obj *command;
const char *string;
@@ -1399,12 +1399,12 @@ HandleTclCommand(
cmdInfoPtr->charOffset += Tcl_NumUtfChars(string, -1);
cmdInfoPtr->buffer[0] = '\0';
} else {
int ch;
Tcl_UniChar ch = 0;
p = string;
string += count;
numChars = 0;
while (p < string) {
p += TkUtfToUniChar(p, &ch);
p += Tcl_UtfToUniChar(p, &ch);
numChars++;
}
cmdInfoPtr->charOffset += numChars;