From a296aece71e039dee4c9d7769482ba19be1a9de7 Mon Sep 17 00:00:00 2001 From: Dannii Willis Date: Thu, 25 Jul 2024 08:00:11 +1000 Subject: [PATCH 1/4] Begun working on a hyperlinks framework - supports rules and keypresses --- .editorconfig | 11 ++-- .../Inter/Architecture32Kit/Sections/Glk.i6t | 57 +++++++++++++++++++ .../Architecture32Kit/Sections/Startup.i6t | 6 ++ .../Source/Sections/Glulx and Glk.w | 51 +++++++++++++++++ .../Sections/Miscellaneous Definitions.w | 5 +- .../Source/Sections/Phrase Definitions.w | 2 +- .../Materials/Languages/English/Index.txt | 1 + .../Chapter 3/Standards Element.w | 2 + 8 files changed, 126 insertions(+), 9 deletions(-) diff --git a/.editorconfig b/.editorconfig index 3b02053a52..c3bd687a77 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,12 +12,9 @@ insert_final_newline = false [*.{i6t,i7,i7x,neptune,ni,txt,w}] indent_style = tab +[*.{i6t,w}] +insert_final_newline = true + [*.json] indent_style = space -indent_size = 4 - -[inform7/Tests/Test Cases/*.txt] -indent_style = tab - -[resources/Documentation/**.txt] -indent_style = tab +indent_size = 4 \ No newline at end of file diff --git a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Glk.i6t b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Glk.i6t index cabf255333..c05d15829e 100644 --- a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Glk.i6t +++ b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Glk.i6t @@ -740,6 +740,63 @@ requested. return 0; ]; +@h Hyperlinks. +A simple framework for handling hyperlinks in an interoperable manner. +We combine a hyperlink tag with a payload in one 32-bit value. The tag is stored +in the lowest bits, and the payload above it. + += +Global hyperlink_payload_mask; +Global hyperlink_tag_mask; +Global hyperlink_tag_width; +Global hyperlink_value; + +[ CALCULATE_HYPERLINK_TAG_WIDTH_R; + if (ICOUNT_HYPERLINK_TAG < 8) { + hyperlink_tag_mask = $07; + hyperlink_tag_width = 3; + } + else if (ICOUNT_HYPERLINK_TAG < 16) { + hyperlink_tag_mask = $0F; + hyperlink_tag_width = 4; + } + else { + ! Enough for 31 tags, which better be enough! + hyperlink_tag_mask = $1F; + hyperlink_tag_width = 5; + } + hyperlink_payload_mask = ~hyperlink_tag_mask; + rfalse; +]; + +[ MakeTaggedHyperlink tag val; + if (Cached_Glk_Gestalts-->gestalt_Hyperlinks) { + if (val > 0) { + @shiftl val hyperlink_tag_width val; + } + else { + val = val & hyperlink_payload_mask; + } + glk_set_hyperlink(tag | val); + } +]; + +[ HANDLE_HYPERLINK_R val; + if (current_glk_event-->GLK_EVENT_TYPE_SF == evtype_Hyperlink) { + val = current_glk_event-->GLK_EVENT_VALUE1_SF; + glk_request_hyperlink_event((current_glk_event-->GLK_EVENT_WINDOW_SF).glk_ref); + hyperlink_value = val & hyperlink_payload_mask; + if (hyperlink_value < 0) { + hyperlink_value = hyperlink_value | hyperlink_tag_mask; + } + else { + @ushiftr hyperlink_value hyperlink_tag_width hyperlink_value; + } + FollowRulebook(HYPERLINK_HANDLING_RB, val & hyperlink_tag_mask, true); + } + rfalse; +]; + @h Suspending and resuming text input. These functions allow the author to suspend and then resume a window's text input requests. diff --git a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Startup.i6t b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Startup.i6t index 5ab0b3d389..2c29731e00 100644 --- a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Startup.i6t +++ b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Startup.i6t @@ -113,6 +113,9 @@ Global Pre_Startup_Text_Capture_Stream; if (BasicInformKit`MANUAL_INPUT_ECHOING_CFGF && Cached_Glk_Gestalts-->gestalt_LineInputEcho) { glk_set_echo_line_event(gg_mainwin, 0); } + if (Cached_Glk_Gestalts-->gestalt_Hyperlinks) { + glk_request_hyperlink_event(gg_mainwin); + } } else { ! There was already a story window. We should erase it. glk_window_clear(gg_mainwin); @@ -124,6 +127,9 @@ Global Pre_Startup_Text_Capture_Stream; gg_statuswin = glk_window_open(gg_mainwin, winmethod_Fixed + winmethod_Above, statuswin_cursize, wintype_TextGrid, GG_STATUSWIN_ROCK); + if (Cached_Glk_Gestalts-->gestalt_Hyperlinks) { + glk_request_hyperlink_event(gg_statuswin); + } } } else if (gg_statuswin) { diff --git a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w index d1b3a84bc0..2242d4e2d9 100644 --- a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w +++ b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w @@ -195,6 +195,57 @@ To replace current event with (ev - glk event): Glk event handling rule for a screen resize event (this is the redraw the status line rule): redraw the status window; +@h Hyperlinks. +A simple framework for handling hyperlinks in an interoperable manner. + += +Chapter - Hyperlinks + +A hyperlink tag is a kind of value. + +The hyperlink value is a number variable. +The hyperlink value variable is defined by Inter as "hyperlink_value". + +The hyperlink handling rules is a hyperlink tag based rulebook. +The hyperlink handling rules is accessible to Inter as "HYPERLINK_HANDLING_RB". + +The handle hyperlinks rule is listed in the glk event handling rules. +The handle hyperlinks rule is defined by Inter as "HANDLE_HYPERLINK_R". + +To say end link: + (- if (Cached_Glk_Gestalts-->gestalt_Hyperlinks) { glk_set_hyperlink(0); } -). + +@ And some built-in hyperlink tags: + +- A rule hyperlink runs a rule when clicked; that in turn allows you to run any other code you like. +- A keypress hyperlink converts a hyperlink event into a character event, for the specified unicode character. + += + +Rule hyperlink is a hyperlink tag. + +To say link (R - rule): + (- MakeTaggedHyperlink((+ rule hyperlink +), {R}); -). + +Hyperlink handling rule for a rule hyperlink (this is the rule hyperlink rule): + run rule at address hyperlink value; + +Keypress hyperlink is a hyperlink tag. + +To say link (C - unicode character): + (- MakeTaggedHyperlink((+ keypress hyperlink +), {C}); -). + +Hyperlink handling rule for a keypress hyperlink (this is the keypress hyperlink rule): + process a character event for (hyperlink value of the current glk event as a unicode character) in (window of the current glk event); + +Section - unindexed + +To run rule at address (R - number): + (- ({R})(); -). + +To decide what unicode character is (N - number) as a unicode character: + (- ({N}) -). + @h Suspending input. These properties and phrases allow the author to suspend and resume input requests. diff --git a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Miscellaneous Definitions.w b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Miscellaneous Definitions.w index dd07c75f2a..2f70283f43 100644 --- a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Miscellaneous Definitions.w +++ b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Miscellaneous Definitions.w @@ -154,10 +154,13 @@ Section - Startup C (for Glulx only) The start capturing startup text rule is listed first in the before starting the virtual machine rules. [1st] The start capturing startup text rule translates into Inter as "CAPTURE_STARTUP_TEXT_R". +The calculate hyperlink tag width rule is listed in the before starting the virtual machine rules. [6th] +The calculate hyperlink tag width rule translates into Inter as "CALCULATE_HYPERLINK_TAG_WIDTH_R". + @ These rules now set up the built in sound channels and windows. = -The set default stylehints rule is listed in the before starting the virtual machine rules. [6th] +The set default stylehints rule is listed in the before starting the virtual machine rules. [7th] The set default stylehints rule translates into Inter as "SET_DEFAULT_STYLEHINTS_R". The sound channel initialisation rule is listed in the for starting the virtual machine rules. diff --git a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Phrase Definitions.w b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Phrase Definitions.w index 09c426a18b..14418877b1 100644 --- a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Phrase Definitions.w +++ b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Phrase Definitions.w @@ -2050,4 +2050,4 @@ Chapter 11 - Use Options Section 1 - Numerical Value To decide what number is the numerical value of (U - a use option): - (- USE_OPTION_VALUES-->({U}) -). + (- USE_OPTION_VALUES-->({U}) -). \ No newline at end of file diff --git a/inform7/Internal/Extensions/Graham Nelson/English Language.i7xd/Materials/Languages/English/Index.txt b/inform7/Internal/Extensions/Graham Nelson/English Language.i7xd/Materials/Languages/English/Index.txt index 9afe454c6d..1f6ab6eca4 100644 --- a/inform7/Internal/Extensions/Graham Nelson/English Language.i7xd/Materials/Languages/English/Index.txt +++ b/inform7/Internal/Extensions/Graham Nelson/English Language.i7xd/Materials/Languages/English/Index.txt @@ -314,6 +314,7 @@ %Index.Elements.St.IdentifySchannelsRules = Identify glk sound channels rules %Index.Elements.St.GlkObjectUpdatingRules = Glk object updating rules %Index.Elements.St.GlkEventHandlingRules = Glk event handling rules +%Index.Elements.St.HyperlinkHandlingRules = Hyperlink handling rules %Index.Elements.St.CheckRules = Check rules are tied to specific actions, and there are too many to index here. diff --git a/inter/index-module/Chapter 3/Standards Element.w b/inter/index-module/Chapter 3/Standards Element.w index c272c25d3f..b539ab9d05 100644 --- a/inter/index-module/Chapter 3/Standards Element.w +++ b/inter/index-module/Chapter 3/Standards Element.w @@ -57,6 +57,8 @@ void StandardsElement::render(OUTPUT_STREAM, index_session *session) { IndexRules::find_rulebook(inv, I"GLK_OBJECT_UPDATING_RB"), NULL, 1, TRUE, session); IndexRules::rulebook_box(OUT, inv, I"Index.Elements.St.GlkEventHandlingRules", NULL, IndexRules::find_rulebook(inv, I"GLK_EVENT_HANDLING_RB"), NULL, 1, TRUE, session); + IndexRules::rulebook_box(OUT, inv, I"Index.Elements.St.HyperlinkHandlingRules", NULL, + IndexRules::find_rulebook(inv, I"HYPERLINK_HANDLING_RB"), NULL, 1, TRUE, session); @ = StandardsElement::subhead(OUT, LD, From ca01a78b5518cd63a4a2098c7dcf280fdab69a6e Mon Sep 17 00:00:00 2001 From: Dannii Willis Date: Sat, 27 Jul 2024 13:54:30 +1000 Subject: [PATCH 2/4] Add some type safety to the hyperlink framework --- .../Inter/Architecture32Kit/Sections/Glk.i6t | 28 ++++++++++++++++++- .../Source/Sections/Glulx and Glk.w | 28 +++++++++---------- 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Glk.i6t b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Glk.i6t index c05d15829e..d65b087197 100644 --- a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Glk.i6t +++ b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Glk.i6t @@ -745,6 +745,10 @@ A simple framework for handling hyperlinks in an interoperable manner. We combine a hyperlink tag with a payload in one 32-bit value. The tag is stored in the lowest bits, and the payload above it. +|CALCULATE_HYPERLINK_TAG_WIDTH_R| is a |before starting the virtual machine| rule, +which gets the number of options in the hyperlink tag enum and sets the tag/payload +masks and widths accordingly. + = Global hyperlink_payload_mask; Global hyperlink_tag_mask; @@ -769,8 +773,30 @@ Global hyperlink_value; rfalse; ]; -[ MakeTaggedHyperlink tag val; +@ |MakeTaggedHyperlink| combines the tag and value into one 32 bit hyperlink ID, +checking that the value is not a pointer to ephemeral data (on the stack). + +|HANDLE_HYPERLINK_R| then extracts tag and value from an ID, expanding the value +back to 32 bits. + += + +[ MakeTaggedHyperlink tag val kind; if (Cached_Glk_Gestalts-->gestalt_Hyperlinks) { + #Ifdef DEBUG; + if (val >= blockv_stack && val < (blockv_stack + BLOCKV_STACK_SIZE * WORDSIZE)) { + if (kind) { + if (KindConformsTo_POINTER_VALUE_TY(kind)) { + ! Break up the message so that Inform doesn't think it's an Inter invocation + print "Error: cannot make hyperlink from ephemeral value; try creating with {", "-by-reference:V}^"; + return; + } + } + else { + print "Warning: hyperlink value might be ephemeral; try creating with explicit kind^"; + } + } + #Endif; ! DEBUG if (val > 0) { @shiftl val hyperlink_tag_width val; } diff --git a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w index 2242d4e2d9..065ce3c01a 100644 --- a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w +++ b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w @@ -203,18 +203,24 @@ Chapter - Hyperlinks A hyperlink tag is a kind of value. -The hyperlink value is a number variable. -The hyperlink value variable is defined by Inter as "hyperlink_value". - The hyperlink handling rules is a hyperlink tag based rulebook. The hyperlink handling rules is accessible to Inter as "HYPERLINK_HANDLING_RB". The handle hyperlinks rule is listed in the glk event handling rules. The handle hyperlinks rule is defined by Inter as "HANDLE_HYPERLINK_R". +To say link (T - hyperlink tag): + (- MakeTaggedHyperlink({T}); -). + +To say link (T - hyperlink tag) of (V - value of kind K): + (- MakeTaggedHyperlink({T}, {-by-reference:V}, {-strong-kind:K}); -). + To say end link: (- if (Cached_Glk_Gestalts-->gestalt_Hyperlinks) { glk_set_hyperlink(0); } -). +To decide what K is hyperlink value as a/an (name of kind of value K): + (- (hyperlink_value) -). + @ And some built-in hyperlink tags: - A rule hyperlink runs a rule when clicked; that in turn allows you to run any other code you like. @@ -225,26 +231,18 @@ To say end link: Rule hyperlink is a hyperlink tag. To say link (R - rule): - (- MakeTaggedHyperlink((+ rule hyperlink +), {R}); -). + (- MakeTaggedHyperlink((+ rule hyperlink +), {-by-reference:R}, RULE_TY); -). Hyperlink handling rule for a rule hyperlink (this is the rule hyperlink rule): - run rule at address hyperlink value; + follow hyperlink value as a rule; Keypress hyperlink is a hyperlink tag. To say link (C - unicode character): - (- MakeTaggedHyperlink((+ keypress hyperlink +), {C}); -). + (- MakeTaggedHyperlink((+ keypress hyperlink +), {-by-reference:C}, UNICODE_CHARACTER_TY); -). Hyperlink handling rule for a keypress hyperlink (this is the keypress hyperlink rule): - process a character event for (hyperlink value of the current glk event as a unicode character) in (window of the current glk event); - -Section - unindexed - -To run rule at address (R - number): - (- ({R})(); -). - -To decide what unicode character is (N - number) as a unicode character: - (- ({N}) -). + process a character event for (hyperlink value as a unicode character) in (window of the current glk event); @h Suspending input. These properties and phrases allow the author to suspend and resume input requests. From b510a46425bd22c53e81ba2c3cd6475ffb7b0263 Mon Sep 17 00:00:00 2001 From: Dannii Willis Date: Sun, 11 Aug 2024 17:40:17 +1000 Subject: [PATCH 3/4] If we're always requesting hyperlinks then we don't have to track it --- .../Inter/Architecture32Kit/Sections/Glk.i6t | 23 +------------------ .../Architecture32Kit/Sections/InfGlk.i6t | 22 +++++++++--------- .../Source/Sections/Glulx and Glk.w | 4 +--- 3 files changed, 13 insertions(+), 36 deletions(-) diff --git a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Glk.i6t b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Glk.i6t index d65b087197..05d53923fc 100644 --- a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Glk.i6t +++ b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/Glk.i6t @@ -479,7 +479,7 @@ be used by `glk_select`. It also handles a few event maintenance tasks. evtype_MouseInput: win_obj.requesting_mouse = false; evtype_Hyperlink: - win_obj.requesting_hyperlink = false; + glk_request_hyperlink_event(win_obj.glk_ref); } return ev; ]; @@ -633,16 +633,6 @@ requested. return 0; ]; -[ glk_cancel_hyperlink_event win win_obj; - @push win; - @glk 259 1 0; - win_obj = FindGlkWindowFromRefNum(win); - if (win_obj) { - win_obj.requesting_hyperlink = false; - } - return 0; -]; - [ glk_cancel_line_event win event_struct win_obj; if (event_struct == 0) { event_struct = gg_arguments; @@ -688,16 +678,6 @@ requested. return 0; ]; -[ glk_request_hyperlink_event win win_obj; - @push win; - @glk 258 1 0; - win_obj = FindGlkWindowFromRefNum(win); - if (win_obj) { - win_obj.requesting_hyperlink = true; - } - return 0; -]; - [ glk_request_line_event win buf maxlen initlen win_obj; @push initlen; @push maxlen; @@ -810,7 +790,6 @@ back to 32 bits. [ HANDLE_HYPERLINK_R val; if (current_glk_event-->GLK_EVENT_TYPE_SF == evtype_Hyperlink) { val = current_glk_event-->GLK_EVENT_VALUE1_SF; - glk_request_hyperlink_event((current_glk_event-->GLK_EVENT_WINDOW_SF).glk_ref); hyperlink_value = val & hyperlink_payload_mask; if (hyperlink_value < 0) { hyperlink_value = hyperlink_value | hyperlink_tag_mask; diff --git a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/InfGlk.i6t b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/InfGlk.i6t index 011d5af3be..5bb7d391a7 100644 --- a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/InfGlk.i6t +++ b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Materials/Inter/Architecture32Kit/Sections/InfGlk.i6t @@ -690,17 +690,17 @@ Constant wintype_TextGrid = 4; return 0; ]; -![ glk_request_hyperlink_event _vararg_count; -! ! glk_request_hyperlink_event(window) -! @glk 258 _vararg_count 0; -! return 0; -!]; +[ glk_request_hyperlink_event _vararg_count; + ! glk_request_hyperlink_event(window) + @glk 258 _vararg_count 0; + return 0; +]; -![ glk_cancel_hyperlink_event _vararg_count; -! ! glk_cancel_hyperlink_event(window) -! @glk 259 _vararg_count 0; -! return 0; -!]; +[ glk_cancel_hyperlink_event _vararg_count; + ! glk_cancel_hyperlink_event(window) + @glk 259 _vararg_count 0; + return 0; +]; [ glk_buffer_to_lower_case_uni _vararg_count ret; ! glk_buffer_to_lower_case_uni(uintarray, arraylen, uint) => uint @@ -921,4 +921,4 @@ Constant zcolor_Current = -2; ! garglk_set_reversevideo_stream(str, reverse) @glk $1103 _vararg_count 0; return 0; -]; \ No newline at end of file +]; diff --git a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w index 065ce3c01a..7f4a14695e 100644 --- a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w +++ b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w @@ -212,7 +212,7 @@ The handle hyperlinks rule is defined by Inter as "HANDLE_HYPERLINK_R". To say link (T - hyperlink tag): (- MakeTaggedHyperlink({T}); -). -To say link (T - hyperlink tag) of (V - value of kind K): +To say link (T - hyperlink tag) for/of/with (V - value of kind K): (- MakeTaggedHyperlink({T}, {-by-reference:V}, {-strong-kind:K}); -). To say end link: @@ -252,8 +252,6 @@ Chapter - Suspending and resuming input A glk window has a text input status. The text input status property translates into Inter as "text_input_status". -A glk window can be requesting hyperlink input. -The requesting hyperlink input property translates into Inter as "requesting_hyperlink". A glk window can be requesting mouse input. The requesting mouse input property translates into Inter as "requesting_mouse". From 37feaa440709429314502f25b08330d45ae4dc8a Mon Sep 17 00:00:00 2001 From: Dannii Willis Date: Sat, 3 Jan 2026 17:42:31 +1000 Subject: [PATCH 4/4] Minor updates for changes to Inform --- .editorconfig | 8 +++++++- .../Basic Inform.i7xd/Source/Sections/Glulx and Glk.w | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index c3bd687a77..f246a51a4b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -17,4 +17,10 @@ insert_final_newline = true [*.json] indent_style = space -indent_size = 4 \ No newline at end of file +indent_size = 4 + +[inform7/Tests/Test Cases/*.txt] +indent_style = tab + +[resources/Documentation/**.txt] +indent_style = tab \ No newline at end of file diff --git a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w index 7f4a14695e..962487b35b 100644 --- a/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w +++ b/inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7xd/Source/Sections/Glulx and Glk.w @@ -242,7 +242,7 @@ To say link (C - unicode character): (- MakeTaggedHyperlink((+ keypress hyperlink +), {-by-reference:C}, UNICODE_CHARACTER_TY); -). Hyperlink handling rule for a keypress hyperlink (this is the keypress hyperlink rule): - process a character event for (hyperlink value as a unicode character) in (window of the current glk event); + replace current event with a character event with (hyperlink value as a unicode character) in (window of the current glk event initialiser); @h Suspending input. These properties and phrases allow the author to suspend and resume input requests.