We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc3c542 commit 4cea129Copy full SHA for 4cea129
library/selection_node.py
@@ -37,10 +37,11 @@ def node_from_range_old(root,atok, r ):
37
38
39
def node_from_range_new(root,atok,r,special = False,lenient = False):
40
- # print(" inside the new note from range\n",root)
41
- inside = lambda x,y: (y[0]<=x[0]<y[1] and y[0]<x[1]<=y[1])
+ # notes like ast.Store result in (0,0) with atok.get_text_range()
+ # which causes problems if the cursor is right at the beginning of the file
42
+ inside = lambda x,y: (y[0]<=x[0]<y[1] and y[0]<x[1]<=y[1] and not y[0]==y[1]==0)
43
if lenient:
- inside = lambda x,y: (y[0]<=x[0]<=y[1] and y[0]<=x[1]<=y[1])
44
+ inside = lambda x,y: (y[0]<=x[0]<=y[1] and y[0]<=x[1]<=y[1]andnoty[0]==y[1]==0)
45
generic_fix(root,atok)
46
# print(" the fields are now",root._fields)
47
for child in ast.iter_child_nodes(root):
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments