示例#1
0
        public void ListWithSpaceAndComma_WriteInEnum_EditWorks()
        {
            Model.SetList("list", new List <string> {
                "some|text", "other, text", "content"
            });
            ViewPort.Edit("^table[a:list]2 ");

            ViewPort.Edit("\"other, text\" ");

            Assert.Equal(1, Model.ReadMultiByteValue(0, 2));
            Assert.Equal(2, ViewPort.ConvertViewPointToAddress(ViewPort.SelectionStart));
        }
示例#2
0
        public void OneListLengthTable_EnumsUseList_AllowJumpToTable()
        {
            Model.SetList("list", new[] { "a", "b" });
            ViewPort.Edit("@00 ^table1[x:]list ");

            ViewPort.Edit("@100 ^table2[y:list]2 ");
            var tool = (ComboBoxArrayElementViewModel)ViewPort.Tools.TableTool.Children.Single(e => e is ComboBoxArrayElementViewModel cbaevm && cbaevm.Name == "y");

            tool.GotoSource.Execute();

            Assert.Equal(0, ViewPort.ConvertViewPointToAddress(ViewPort.SelectionStart));
        }
示例#3
0
 private int ToAddress(Point p) => ViewPort.ConvertViewPointToAddress(p);