File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
testsuite/tests/gs.510.paste_to_console Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -2034,7 +2034,13 @@ package body Interactive_Consoles is
2034
2034
-- We also execute empty commands, since they might be relevant
2035
2035
-- in some contexts (python for instance)
2036
2036
if Command /= null and then Command.all /= " " then
2037
- Get_End_Iter (Console.Buffer, Last_Iter);
2037
+ Get_Iter_At_Mark
2038
+ (Console.Buffer, Last_Iter, Get_Insert (Console.Buffer));
2039
+
2040
+ if Last_Iter = Null_Text_Iter then
2041
+ Get_End_Iter (Console.Buffer, Last_Iter);
2042
+ end if ;
2043
+
2038
2044
Insert (Console.Buffer, Last_Iter, Command.all );
2039
2045
2040
2046
-- Execute only if Command ends with a Line Feed.
Original file line number Diff line number Diff line change @@ -23,3 +23,15 @@ def run_test():
23
23
">>> Put_Line" ,
24
24
"Wrong Paste" ,
25
25
)
26
+
27
+ # test insert at the cursor location
28
+ send_key_event (GDK_LEFT )
29
+ yield wait_idle ()
30
+ send_key_event (ord ("v" ), control = True )
31
+ yield wait_idle ()
32
+ gps_assert (
33
+ GPS .Console ("Python" ).get_text (),
34
+ ">>> Put_LinPut_Linee" ,
35
+ "Wrong Paste" ,
36
+ )
37
+
You can’t perform that action at this time.
0 commit comments