before_code stringlengths 14 465k | reviewer_comment stringlengths 16 64.5k | after_code stringlengths 9 467k | diff_context stringlengths 0 97k | file_path stringlengths 5 226 | comment_line int32 0 26 | language stringclasses 37
values | quality_score float32 0.07 1 | comment_type stringclasses 9
values | comment_length int32 16 64.5k | before_lines int32 1 17.2k | after_lines int32 1 12.1k | is_negative bool 2
classes | pr_title stringlengths 1 308 | pr_number int32 1 299k | repo_name stringclasses 533
values | repo_stars int64 321 419k | repo_language stringclasses 27
values | reviewer_username stringlengths 0 39 | author_username stringlengths 2 39 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
from .netverse import (
NetverseIE,
NetversePlaylistIE,
NetverseSearchIE,
)
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia import (
AppleDailyIE,
... | No issues found. | from .netverse import (
NetverseIE,
NetversePlaylistIE,
NetverseSearchIE,
)
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia import (
AppleDailyIE,
... | @@ -2092,6 +2092,7 @@
TheGuardianPodcastIE,
TheGuardianPodcastPlaylistIE,
)
+from .thehighwire import TheHighWireIE
from .theholetv import TheHoleTvIE
from .theintercept import TheInterceptIE
from .theplatform import ( | yt_dlp/extractor/_extractors.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/TheHighWire] Add extractor | 13,505 | yt-dlp/yt-dlp | 132,642 | Python | swayll | |
'https://www.youtube.com/s/player/009f1d77/player_ias.vflset/en_US/base.js',
'5dwFHw8aFWQUQtffRq', 'audescmLUzI3jw',
),
(
'https://www.youtube.com/s/player/dc0c6770/player_ias.vflset/en_US/base.js',
'5EHDMgYLV6HPGk_Mu-kk', 'n9lUJLHbxUI0GQ',
),
(
'https://www.youtu... | No issues found. | 'https://www.youtube.com/s/player/009f1d77/player_ias.vflset/en_US/base.js',
'5dwFHw8aFWQUQtffRq', 'audescmLUzI3jw',
),
(
'https://www.youtube.com/s/player/dc0c6770/player_ias.vflset/en_US/base.js',
'5EHDMgYLV6HPGk_Mu-kk', 'n9lUJLHbxUI0GQ',
),
(
'https://www.youtu... | @@ -133,6 +133,11 @@
'2aq0aqSyOoJXtK73m-uME_jv7-pT15gOFC02RFkGMqWpzEICs69VdbwQ0LDp1v7j8xx92efCJlYFYb1sUkkBSPOlPmXgIARw8JQ0qOAOAA',
'IAOAOq0QJ8wRAAgXmPlOPSBkkUs1bYFYlJCfe29xx8j7v1pDL0QwbdV96sCIEzpWqMGkFR20CFOg51Tp-7vj_E2u-m37KtXJoOySqa0',
),
+ (
+ 'https://www.youtube.com/s/player/e12fbe... | test/test_youtube_signature.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [jsinterp] Fix `extract_object` | 13,580 | yt-dlp/yt-dlp | 132,642 | Python | seproDev | |
'protocol': 'm3u8_native',
}],
'ja': [{
'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/jpn/prog_index.m3u8',
'ext': 'vtt',
'protocol': 'm3u8... | No issues found. | 'protocol': 'm3u8_native',
}],
'ja': [{
'url': 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/subtitles/jpn/prog_index.m3u8',
'ext': 'vtt',
'protocol': 'm3u8... | @@ -1969,21 +1969,26 @@ def test_search_nextjs_v13_data(self):
<script>self.__next_f.push([1,"df:[\"$undefined\",[\"$\",\"div\",null,{\"children\":[\"$\",\"$L17\",null,{}],\"do_not_include_this_field\":\"fail\"}],[\"$\",\"div\",null,{\"children\":[[\"$\",\"$L19\",null,{\"duplicated_field_name\":{\"x\":1}}]... | test/test_InfoExtractor.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie] Rework `_search_nextjs_v13_data` helper | 13,711 | yt-dlp/yt-dlp | 132,642 | Python | bashonly | |
lang = traverse_obj(subs, ('srclang', {str.lower})) or 'ja'
subtitles.setdefault(lang, []).append({'url': subs['src']})
return {
'id': streaks_id,
'display_id': media_id,
'formats': formats,
'live_status': live_status,
'subtitl... | No issues found. | lang = traverse_obj(subs, ('srclang', {str.lower})) or 'ja'
subtitles.setdefault(lang, []).append({'url': subs['src']})
return {
'id': streaks_id,
'display_id': media_id,
'formats': formats,
'live_status': live_status,
'subtitl... | @@ -33,16 +33,20 @@ def _extract_from_streaks_api(self, project_id, media_id, headers=None, query=No
**(headers or {}),
})
except ExtractorError as e:
- if isinstance(e.cause, HTTPError) and e.cause.status in {403, 404}:
+ if isinstance(e.cause, HTTPE... | yt_dlp/extractor/streaks.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/TVer] Extract Streaks API info | 13,885 | yt-dlp/yt-dlp | 132,642 | Python | bashonly | |
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia import (
AppleDailyIE,
NextMediaActionNewsIE,
NextMediaIE,
NextTVIE,
)
from .nexx import (
Nexx... | No issues found. | from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia import (
AppleDailyIE,
NextMediaActionNewsIE,
NextMediaIE,
NextTVIE,
)
from .nexx import (
Nexx... | @@ -58,13 +58,7 @@
ADNSeasonIE,
)
from .adobeconnect import AdobeConnectIE
-from .adobetv import (
- AdobeTVChannelIE,
- AdobeTVEmbedIE,
- AdobeTVIE,
- AdobeTVShowIE,
- AdobeTVVideoIE,
-)
+from .adobetv import AdobeTVVideoIE
from .adultswim import AdultSwimIE
from .aenetworks import (
AENet... | yt_dlp/extractor/_extractors.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/adobetv] Fix extractor | 13,917 | yt-dlp/yt-dlp | 132,642 | Python | doe1080 | |
# Allow direct execution
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import yt_dlp
import yt_dlp.options
create_parser = yt_dlp.options.create_parser
def parse_patched_options(opts):
patched_parser = create_parser()
patched_parser.defaults.update({
... | No issues found. |
# Allow direct execution
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import yt_dlp
import yt_dlp.options
create_parser = yt_dlp.options.create_parser
def parse_patched_options(opts):
patched_parser = create_parser()
patched_parser.defaults.update({
... | @@ -20,6 +20,7 @@ def parse_patched_options(opts):
'fragment_retries': 0,
'extract_flat': False,
'concat_playlist': 'never',
+ 'update_self': False,
})
yt_dlp.options.create_parser = lambda: patched_parser
try: | devscripts/cli_to_api.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | Warn when yt-dlp is severely outdated | 13,937 | yt-dlp/yt-dlp | 132,642 | Python | seproDev | |
)
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia import (
AppleDailyIE,
NextMediaActionNewsIE,
NextMediaIE,
NextTVIE,
)
from .nexx import (
Ne... | No issues found. | )
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia import (
AppleDailyIE,
NextMediaActionNewsIE,
NextMediaIE,
NextTVIE,
)
from .nexx import (
Ne... | @@ -2149,6 +2149,7 @@
)
from .tumblr import TumblrIE
from .tunein import (
+ TuneInEmbedIE,
TuneInPodcastEpisodeIE,
TuneInPodcastIE,
TuneInShortenerIE, | yt_dlp/extractor/_extractors.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/tunein] Fix extractors | 13,981 | yt-dlp/yt-dlp | 132,642 | Python | doe1080 | |
manifest_base_url = get_base_url(manifest)
bootstrap_info = xpath_element(
manifest, ['{http://ns.adobe.com/f4m/1.0}bootstrapInfo', '{http://ns.adobe.com/f4m/2.0}bootstrapInfo'],
'bootstrap info', default=None)
vcodec = None
mime_type = xpath_text(
... | No issues found. |
manifest_base_url = get_base_url(manifest)
bootstrap_info = xpath_element(
manifest, ['{http://ns.adobe.com/f4m/1.0}bootstrapInfo', '{http://ns.adobe.com/f4m/2.0}bootstrapInfo'],
'bootstrap info', default=None)
vcodec = None
mime_type = xpath_text(
... | @@ -1527,11 +1527,11 @@ def _rta_search(html):
r'>\s*(?:18\s+U(?:\.S\.C\.|SC)\s+)?(?:§+\s*)?2257\b',
]
- age_limit = 0
+ age_limit = None
for marker in AGE_LIMIT_MARKERS:
mobj = re.search(marker, html)
if mobj:
- age_limit = max(age... | yt_dlp/extractor/common.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie] `_rta_search`: Do not assume `age_limit` is `0` | 13,985 | yt-dlp/yt-dlp | 132,642 | Python | doe1080 | |
json.loads(js_to_json(
'''{
'object': a,
'objectStr': b,
'array': c,
'arrayStr': d,
}''',
{
'a': '{}',
'b': '"{}"',
'c':... | No issues found. | json.loads(js_to_json(
'''{
'object': a,
'objectStr': b,
'array': c,
'arrayStr': d,
}''',
{
'a': '{}',
'b': '"{}"',
'c':... | @@ -71,6 +71,8 @@
iri_to_uri,
is_html,
js_to_json,
+ jwt_decode_hs256,
+ jwt_encode,
limit_length,
locked_file,
lowercase_escape,
@@ -2180,6 +2182,41 @@ def test_partial_application(self):
assert int_or_none(v=10) == 10, 'keyword passed positional should call function'
... | test/test_utils.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [utils] Add improved `jwt_encode` function | 14,071 | yt-dlp/yt-dlp | 132,642 | Python | bashonly | |
NetverseSearchIE,
)
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia import (
AppleDailyIE,
NextMediaActionNewsIE,
NextMediaIE,
NextTVIE,
)
from... | No issues found. | NetverseSearchIE,
)
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia import (
AppleDailyIE,
NextMediaActionNewsIE,
NextMediaIE,
NextTVIE,
)
from... | @@ -1959,6 +1959,7 @@
from .startv import StarTVIE
from .steam import (
SteamCommunityBroadcastIE,
+ SteamCommunityIE,
SteamIE,
)
from .stitcher import ( | yt_dlp/extractor/_extractors.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/steam] Fix extractors | 14,093 | yt-dlp/yt-dlp | 132,642 | Python | doe1080 | |
NetEaseMusicProgramIE,
NetEaseMusicSingerIE,
)
from .netverse import (
NetverseIE,
NetversePlaylistIE,
NetverseSearchIE,
)
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy imp... | No issues found. | NetEaseMusicProgramIE,
NetEaseMusicSingerIE,
)
from .netverse import (
NetverseIE,
NetversePlaylistIE,
NetverseSearchIE,
)
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy imp... | @@ -687,6 +687,10 @@
FrontendMastersIE,
FrontendMastersLessonIE,
)
+from .frontro import (
+ TheChosenGroupIE,
+ TheChosenIE,
+)
from .fujitv import FujiTVFODPlus7IE
from .funk import FunkIE
from .funker530 import Funker530IE | yt_dlp/extractor/_extractors.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/TheChosen] Add extractors | 14,183 | yt-dlp/yt-dlp | 132,642 | Python | mrFlamel | |
NetEaseMusicMvIE,
NetEaseMusicProgramIE,
NetEaseMusicSingerIE,
)
from .netverse import (
NetverseIE,
NetversePlaylistIE,
NetverseSearchIE,
)
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsP... | No issues found. | NetEaseMusicMvIE,
NetEaseMusicProgramIE,
NetEaseMusicSingerIE,
)
from .netverse import (
NetverseIE,
NetversePlaylistIE,
NetverseSearchIE,
)
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsP... | @@ -640,7 +640,10 @@
FilmOnIE,
)
from .filmweb import FilmwebIE
-from .firsttv import FirstTVIE
+from .firsttv import (
+ FirstTVIE,
+ FirstTVLiveIE,
+)
from .fivetv import FiveTVIE
from .flextv import FlexTVIE
from .flickr import FlickrIE | yt_dlp/extractor/_extractors.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/1tv:live] Add extractor | 14,299 | yt-dlp/yt-dlp | 132,642 | Python | swayll | |
)
from .netverse import (
NetverseIE,
NetversePlaylistIE,
NetverseSearchIE,
)
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia import (
AppleDailyIE... | No issues found. | )
from .netverse import (
NetverseIE,
NetversePlaylistIE,
NetverseSearchIE,
)
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia import (
AppleDailyIE... | @@ -143,6 +143,8 @@
from .arcpublishing import ArcPublishingIE
from .ard import (
ARDIE,
+ ARDAudiothekIE,
+ ARDAudiothekPlaylistIE,
ARDBetaMediathekIE,
ARDMediathekCollectionIE,
) | yt_dlp/extractor/_extractors.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/ARDAudiothek] Add extractors | 14,309 | yt-dlp/yt-dlp | 132,642 | Python | evilpie | |
from yt_dlp.extractor.youtube.pot.provider import (
PoTokenContext,
)
from yt_dlp.extractor.youtube.pot.utils import get_webpo_content_binding, ContentBindingType
class TestGetWebPoContentBinding:
@pytest.mark.parametrize('client_name, context, is_authenticated, expected', [
*[(client, context, is_... | No issues found. | from yt_dlp.extractor.youtube.pot.provider import (
PoTokenContext,
)
from yt_dlp.extractor.youtube.pot.utils import get_webpo_content_binding, ContentBindingType
class TestGetWebPoContentBinding:
@pytest.mark.parametrize('client_name, context, is_authenticated, expected', [
*[(client, context, is_... | @@ -45,3 +45,8 @@ def test_no_visitor_id(self, pot_request):
def test_invalid_base64(self, pot_request):
pot_request.visitor_data = 'invalid-base64'
assert get_webpo_content_binding(pot_request, bind_to_visitor_id=True) == (pot_request.visitor_data, ContentBindingType.VISITOR_DATA)
+
+ def tes... | test/test_pot/test_pot_builtin_utils.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/youtube] Detect experiment binding GVS PO Token to video id | 14,471 | yt-dlp/yt-dlp | 132,642 | Python | coletdjnz | |
from .netverse import (
NetverseIE,
NetversePlaylistIE,
NetverseSearchIE,
)
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia import (
AppleDailyIE,
... | No issues found. | from .netverse import (
NetverseIE,
NetversePlaylistIE,
NetverseSearchIE,
)
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia import (
AppleDailyIE,
... | @@ -824,6 +824,13 @@
IchinanaLiveIE,
IchinanaLiveVODIE,
)
+from .idagio import (
+ IdagioAlbumIE,
+ IdagioPersonalPlaylistIE,
+ IdagioPlaylistIE,
+ IdagioRecordingIE,
+ IdagioTrackIE,
+)
from .idolplus import IdolPlusIE
from .ign import (
IGNIE, | yt_dlp/extractor/_extractors.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/idagio] Add extractors | 14,586 | yt-dlp/yt-dlp | 132,642 | Python | robin-mu | |
pattern = r'''(?x)
\{\s*\)%s\(\s*
(?:
(?P<funcname_a>[a-zA-Z0-9_$]+)\s*noitcnuf\s*
|noitcnuf\s*=\s*(?P<funcname_b>[a-zA-Z0-9_$]+)(?:\s+rav)?
)[;\n]
''' % re.escape(match.group('arg... | No issues found. | pattern = r'''(?x)
\{\s*\)%s\(\s*
(?:
(?P<funcname_a>[a-zA-Z0-9_$]+)\s*noitcnuf\s*
|noitcnuf\s*=\s*(?P<funcname_b>[a-zA-Z0-9_$]+)(?:\s+rav)?
)[;\n]
''' % re.escape(match.group('arg... | @@ -147,115 +147,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
r'/(?P<id>[a-zA-Z0-9_-]{8,})/player(?:_ias\.vflset(?:/[a-zA-Z]{2,3}_[a-zA-Z]{2,3})?|-plasma-ias-(?:phone|tablet)-[a-z]{2}_[A-Z]{2}\.vflset)/base\.js$',
r'\b(?P<id>vfl[a-zA-Z0-9_-]+)\b.*?\.js$',
)
- _formats = { # NB: Used in You... | yt_dlp/extractor/youtube/_video.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/web.archive:youtube] Improve extraction | 14,753 | yt-dlp/yt-dlp | 132,642 | Python | seproDev | |
def list_wheel_contents(
wheel_data: bytes,
suffix: str | None = None,
folders: bool = True,
files: bool = True,
) -> str:
assert folders or files, 'at least one of "folders" or "files" must be True'
with zipfile.ZipFile(io.BytesIO(wheel_data)) as zipf:
path_gen = (zin... | No issues found. |
def list_wheel_contents(
wheel_data: bytes,
suffix: str | None = None,
folders: bool = True,
files: bool = True,
) -> str:
assert folders or files, 'at least one of "folders" or "files" must be True'
with zipfile.ZipFile(io.BytesIO(wheel_data)) as zipf:
path_gen = (zin... | @@ -66,7 +66,9 @@ def list_wheel_contents(
) -> str:
assert folders or files, 'at least one of "folders" or "files" must be True'
- path_gen = (zinfo.filename for zinfo in zipfile.ZipFile(io.BytesIO(wheel_data)).infolist())
+ with zipfile.ZipFile(io.BytesIO(wheel_data)) as zipf:
+ path_gen = (zinfo... | devscripts/update_ejs.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [cleanup] Misc | 14,767 | yt-dlp/yt-dlp | 132,642 | Python | bashonly | |
NetEaseMusicSingerIE,
)
from .netverse import (
NetverseIE,
NetversePlaylistIE,
NetverseSearchIE,
)
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia... | No issues found. | NetEaseMusicSingerIE,
)
from .netverse import (
NetverseIE,
NetversePlaylistIE,
NetverseSearchIE,
)
from .netzkino import NetzkinoIE
from .newgrounds import (
NewgroundsIE,
NewgroundsPlaylistIE,
NewgroundsUserIE,
)
from .newspicks import NewsPicksIE
from .newsy import NewsyIE
from .nextmedia... | @@ -1218,6 +1218,7 @@
N1InfoAssetIE,
N1InfoIIE,
)
+from .nascar import NascarClassicsIE
from .nate import (
NateIE,
NateProgramIE, | yt_dlp/extractor/_extractors.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/NascarClassics] Add extractor | 14,866 | yt-dlp/yt-dlp | 132,642 | Python | JrM2628 | |
subtitles.add_option(
'--no-write-auto-subs', '--no-write-automatic-subs',
action='store_false', dest='writeautomaticsub', default=False,
help='Do not write auto-generated subtitles (default) (Alias: --no-write-automatic-subs)')
subtitles.add_option(
'--all-subs',
action=... | No issues found. | subtitles.add_option(
'--no-write-auto-subs', '--no-write-automatic-subs',
action='store_false', dest='writeautomaticsub', default=False,
help='Do not write auto-generated subtitles (default) (Alias: --no-write-automatic-subs)')
subtitles.add_option(
'--all-subs',
action=... | @@ -466,7 +466,8 @@ def _preset_alias_callback(option, opt_str, value, parser):
callback_kwargs={'delim': None},
default=['deno'],
help=(
- 'Additional JavaScript runtime to enable, with an optional path to the runtime location. '
+ 'Additional JavaScript runtime to enab... | yt_dlp/options.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | Allow `--js-runtimes` to accept file or dir as its `PATH` argument | 14,964 | yt-dlp/yt-dlp | 132,642 | Python | bashonly | |
# We are restricted to known HTTP status codes in http.HTTPStatus
# Redirects are not supported for websockets
@pytest.mark.parametrize('status', (200, 204, 301, 302, 303, 400, 500, 511))
def test_raise_http_error(self, handler, status):
with handler() as rh:
with pytest.raises(HTTPE... | No issues found. | # We are restricted to known HTTP status codes in http.HTTPStatus
# Redirects are not supported for websockets
@pytest.mark.parametrize('status', (200, 204, 301, 302, 303, 400, 500, 511))
def test_raise_http_error(self, handler, status):
with handler() as rh:
with pytest.raises(HTTPE... | @@ -40,7 +40,7 @@
pytestmark = pytest.mark.handler_flaky(
'Websockets',
- os.name != 'nt' and sys.implementation.name == 'pypy',
+ os.name == 'nt' or sys.implementation.name == 'pypy',
reason='segfaults',
)
| test/test_websockets.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [rh:urllib] Do not read after close | 15,049 | yt-dlp/yt-dlp | 132,642 | Python | bashonly | |
if isinstance(expected, type):
if not isinstance(got, expected):
yield field, f'expected {expected.__name__}, got {type(got).__name__}'
return
if isinstance(expected, list) and isinstance(got, list):
# TODO: clever diffing algorithm lmao
if len(expected) != len(got):... | No issues found. | if isinstance(expected, type):
if not isinstance(got, expected):
yield field, f'expected {expected.__name__}, got {type(got).__name__}'
return
if isinstance(expected, list) and isinstance(got, list):
# TODO: clever diffing algorithm lmao
if len(expected) != len(got):... | @@ -263,7 +263,7 @@ def expect_info_dict(self, got_dict, expected_dict):
# NB: Keep in sync with the docstring of extractor/common.py
'ie_key', 'url', 'id', 'ext', 'direct', 'display_id', 'title', 'alt_title', 'description', 'media_type',
'uploader', 'uploader_id', 'uploader_url', 'channel', ... | test/helper.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/tiktok] Extract `save_count` | 15,054 | yt-dlp/yt-dlp | 132,642 | Python | pomtnp | |
return binary
return basename
def _determine_runtime_path(path, basename):
if not path:
return _find_exe(basename)
if os.path.isdir(path):
return os.path.join(path, basename)
return path
@dataclasses.dataclass(frozen=True)
class JsRuntimeInfo:
name: str
path:... | No issues found. | return binary
return basename
def _determine_runtime_path(path, basename):
if not path:
return _find_exe(basename)
if os.path.isdir(path):
return os.path.join(path, basename)
return path
@dataclasses.dataclass(frozen=True)
class JsRuntimeInfo:
name: str
path:... | @@ -1,21 +1,61 @@
from __future__ import annotations
+
import abc
import dataclasses
import functools
import os.path
+import sys
from ._utils import _get_exe_version_output, detect_exe_version, int_or_none
-# NOT public API
-def runtime_version_tuple(v):
+def _runtime_version_tuple(v):
# NB: will retur... | yt_dlp/utils/_jsruntime.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | Respect `PATHEXT` when locating JS runtime on Windows | 15,117 | yt-dlp/yt-dlp | 132,642 | Python | Grub4K | |
)
from .neteasemusic import (
NetEaseMusicAlbumIE,
NetEaseMusicDjRadioIE,
NetEaseMusicIE,
NetEaseMusicListIE,
NetEaseMusicMvIE,
NetEaseMusicProgramIE,
NetEaseMusicSingerIE,
)
from .netverse import (
NetverseIE,
NetversePlaylistIE,
NetverseSearchIE,
)
from .netzkino import Netzkin... | No issues found. | )
from .neteasemusic import (
NetEaseMusicAlbumIE,
NetEaseMusicDjRadioIE,
NetEaseMusicIE,
NetEaseMusicListIE,
NetEaseMusicMvIE,
NetEaseMusicProgramIE,
NetEaseMusicSingerIE,
)
from .netverse import (
NetverseIE,
NetversePlaylistIE,
NetverseSearchIE,
)
from .netzkino import Netzkin... | @@ -1098,6 +1098,7 @@
)
from .massengeschmacktv import MassengeschmackTVIE
from .masters import MastersIE
+from .matchitv import MatchiTVIE
from .matchtv import MatchTVIE
from .mave import (
MaveChannelIE, | yt_dlp/extractor/_extractors.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/MatchiTV] Add extractor | 15,204 | yt-dlp/yt-dlp | 132,642 | Python | gseddon | |
'int': 123,
'intStr': '123',
'float': 1.23,
'floatStr': '1.23',
},
)
self.assertDictEqual(
json.loads(js_to_json(
'''{
'object': a,
'objectStr': b,
... | No issues found. | 'int': 123,
'intStr': '123',
'float': 1.23,
'floatStr': '1.23',
},
)
self.assertDictEqual(
json.loads(js_to_json(
'''{
'object': a,
'objectStr': b,
... | @@ -489,6 +489,10 @@ def test_unified_timestamps(self):
self.assertEqual(unified_timestamp('Wednesday 31 December 1969 18:01:26 MDT'), 86)
self.assertEqual(unified_timestamp('12/31/1969 20:01:18 EDT', False), 78)
+ self.assertEqual(unified_timestamp('2026-01-01 00:00:00', tz_offset=0), 176722... | test/test_utils.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [utils] `unified_timestamp`: Support an offset for timezone-less datetimes | 15,357 | yt-dlp/yt-dlp | 132,642 | Python | doe1080 | |
NexxEmbedIE,
NexxIE,
)
from .nfb import (
NFBIE,
NFBSeriesIE,
)
from .nfhsnetwork import NFHSNetworkIE
from .nfl import (
NFLIE,
NFLArticleIE,
NFLPlusEpisodeIE,
NFLPlusReplayIE,
)
from .nhk import (
NhkForSchoolBangumiIE,
NhkForSchoolProgramListIE,
NhkForSchoolSubjectIE,
... | No issues found. | NexxEmbedIE,
NexxIE,
)
from .nfb import (
NFBIE,
NFBSeriesIE,
)
from .nfhsnetwork import NFHSNetworkIE
from .nfl import (
NFLIE,
NFLArticleIE,
NFLPlusEpisodeIE,
NFLPlusReplayIE,
)
from .nhk import (
NhkForSchoolBangumiIE,
NhkForSchoolProgramListIE,
NhkForSchoolSubjectIE,
... | @@ -1029,6 +1029,10 @@
)
from .livestreamfails import LivestreamfailsIE
from .lnk import LnkIE
+from .locipo import (
+ LocipoIE,
+ LocipoPlaylistIE,
+)
from .loco import LocoIE
from .loom import (
LoomFolderIE, | yt_dlp/extractor/_extractors.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/locipo] Add extractors | 15,486 | yt-dlp/yt-dlp | 132,642 | Python | doe1080 | |
while stack:
target, index, source = stack.pop()
if isinstance(source, tuple):
name, source, reviver = source
try:
target[index] = reviver(target[index])
except Exception as error:
yield TypeError(f'failed to parse {source} as {name... | No issues found. | while stack:
target, index, source = stack.pop()
if isinstance(source, tuple):
name, source, reviver = source
try:
target[index] = reviver(target[index])
except Exception as error:
yield TypeError(f'failed to parse {source} as {name... | @@ -62,10 +62,10 @@ def parse_iter(parsed: typing.Any, /, *, revivers: dict[str, collections.abc.Cal
if isinstance(source, tuple):
name, source, reviver = source
try:
- resolved[source] = target[index] = reviver(target[index])
+ target[index] = reviver(ta... | yt_dlp/utils/jslib/devalue.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [utils] `devalue`: Fix calling reviver on cached value | 15,568 | yt-dlp/yt-dlp | 132,642 | Python | Grub4K | |
from .nexx import (
NexxEmbedIE,
NexxIE,
)
from .nfb import (
NFBIE,
NFBSeriesIE,
)
from .nfhsnetwork import NFHSNetworkIE
from .nfl import (
NFLIE,
NFLArticleIE,
NFLPlusEpisodeIE,
NFLPlusReplayIE,
)
from .nhk import (
NhkForSchoolBangumiIE,
NhkForSchoolProgramListIE,
NhkForS... | No issues found. | from .nexx import (
NexxEmbedIE,
NexxIE,
)
from .nfb import (
NFBIE,
NFBSeriesIE,
)
from .nfhsnetwork import NFHSNetworkIE
from .nfl import (
NFLIE,
NFLArticleIE,
NFLPlusEpisodeIE,
NFLPlusReplayIE,
)
from .nhk import (
NhkForSchoolBangumiIE,
NhkForSchoolProgramListIE,
NhkForS... | @@ -564,7 +564,10 @@
EroProfileAlbumIE,
EroProfileIE,
)
-from .err import ERRJupiterIE
+from .err import (
+ ERRArhiivIE,
+ ERRJupiterIE,
+)
from .ertgr import (
ERTFlixCodenameIE,
ERTFlixIE, | yt_dlp/extractor/_extractors.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/arhiiv.err.ee] Add extractor | 15,667 | yt-dlp/yt-dlp | 132,642 | Python | rdamas | |
def qualities(quality_ids):
""" Get a numeric quality value out of a list of possible values """
def q(qid):
try:
return quality_ids.index(qid)
except ValueError:
return -1
return q
POSTPROCESS_WHEN = ('pre_process', 'after_filter', 'video', 'before_dl', 'post_pro... | No issues found. |
def qualities(quality_ids):
""" Get a numeric quality value out of a list of possible values """
def q(qid):
try:
return quality_ids.index(qid)
except ValueError:
return -1
return q
POSTPROCESS_WHEN = ('pre_process', 'after_filter', 'video', 'before_dl', 'post_pro... | @@ -75,6 +75,9 @@ def IDENTITY(x):
'fr': [
'janvier', 'février', 'mars', 'avril', 'mai', 'juin',
'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'],
+ 'is': [
+ 'janúar', 'febrúar', 'mars', 'apríl', 'maí', 'júní',
+ 'júlí', 'ágúst', 'september', 'október', 'nóvemb... | yt_dlp/utils/_utils.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/visir] Add extractor | 15,811 | yt-dlp/yt-dlp | 132,642 | Python | doe1080 | |
is_secure = bool(flags & 0x0001)
p.skip(4, 'unknown record field 2')
domain_offset = p.read_uint()
name_offset = p.read_uint()
path_offset = p.read_uint()
value_offset = p.read_uint()
p.skip(8, 'unknown record field 3')
expiration_date = _mac_absolute_time_to_posix(p.read_double())
_... | No issues found. | is_secure = bool(flags & 0x0001)
p.skip(4, 'unknown record field 2')
domain_offset = p.read_uint()
name_offset = p.read_uint()
path_offset = p.read_uint()
value_offset = p.read_uint()
p.skip(8, 'unknown record field 3')
expiration_date = _mac_absolute_time_to_posix(p.read_double())
_... | @@ -1168,6 +1168,7 @@ class LenientSimpleCookie(http.cookies.SimpleCookie):
# We use Morsel's legal key chars to avoid errors on setting values
_LEGAL_KEY_CHARS = r'\w\d' + re.escape('!#$%&\'*+-.:^_`|~')
_LEGAL_VALUE_CHARS = _LEGAL_KEY_CHARS + re.escape('(),/<=>?@[]{}')
+ _LEGAL_KEY_RE = re.compile(rf... | yt_dlp/cookies.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [cookies] Ignore cookies with control characters | 15,862 | yt-dlp/yt-dlp | 132,642 | Python | bashonly | |
'tracks', lambda _, v: v['kind'] in ('captions', 'subtitles') and url_or_none(v['src']),
)):
lang = traverse_obj(subs, ('srclang', {str.lower})) or 'ja'
subtitles.setdefault(lang, []).append({'url': subs['src']})
return {
'id': streaks_id,
'di... | No issues found. | 'tracks', lambda _, v: v['kind'] in ('captions', 'subtitles') and url_or_none(v['src']),
)):
lang = traverse_obj(subs, ('srclang', {str.lower})) or 'ja'
subtitles.setdefault(lang, []).append({'url': subs['src']})
return {
'id': streaks_id,
'di... | @@ -22,7 +22,7 @@ class StreaksBaseIE(InfoExtractor):
_GEO_BYPASS = False
_GEO_COUNTRIES = ['JP']
- def _extract_from_streaks_api(self, project_id, media_id, headers=None, query=None, ssai=False):
+ def _extract_from_streaks_api(self, project_id, media_id, headers=None, query=None, ssai=False, live_fr... | yt_dlp/extractor/streaks.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/tver:olympic] Add extractor | 15,885 | yt-dlp/yt-dlp | 132,642 | Python | doe1080 | |
'url': 'https://www.sbs.com.au/ondemand/program/inside-windsor-castle?play=1283505731842',
'only_matching': True,
}, {
'url': 'https://www.sbs.com.au/news/embeds/video/1840778819866',
'only_matching': True,
}, {
'url': 'https://www.sbs.com.au/ondemand/watch/1698704451971'... | No issues found. | 'url': 'https://www.sbs.com.au/ondemand/program/inside-windsor-castle?play=1283505731842',
'only_matching': True,
}, {
'url': 'https://www.sbs.com.au/news/embeds/video/1840778819866',
'only_matching': True,
}, {
'url': 'https://www.sbs.com.au/ondemand/watch/1698704451971'... | @@ -146,8 +146,8 @@ def _real_extract(self, url):
'release_year': ('releaseYear', {int_or_none}),
'duration': ('duration', ({float_or_none}, {parse_duration})),
'is_live': ('liveStream', {bool}),
- 'age_limit': (('classificationID', 'contentRating'), {st... | yt_dlp/extractor/sbs.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [cleanup] Bump ruff to 0.15.x | 15,951 | yt-dlp/yt-dlp | 132,642 | Python | Grub4K | |
... on Video {title description updatedAt thumbnail createdAt duration likeCount comments views url hasAccess}
}
}''',
}).encode(), headers={
'content-type': 'application/json',
**self._get_auth_headers(url),
... | No issues found. | ... on Video {title description updatedAt thumbnail createdAt duration likeCount comments views url hasAccess}
}
}''',
}).encode(), headers={
'content-type': 'application/json',
**self._get_auth_headers(url),
... | @@ -99,66 +99,3 @@ def _real_extract(self, url):
'modified_timestamp': ('updatedAt', {parse_iso8601}),
}),
}
-
-
-class TheChosenIE(FrontroVideoBaseIE):
- _CHANNEL_ID = '12884901895'
-
- _VALID_URL = r'https?://(?:www\.)?watch\.thechosen\.tv/watch/(?P<id>[0-9]+)'
- _TESTS... | yt_dlp/extractor/frontro.py | 0 | Python | 1 | none | 16 | 51 | 51 | true | [ie/thechosen] Rework extractor | 16,021 | yt-dlp/yt-dlp | 132,642 | Python | 0xvd | |
///
/// Default: true
pub enabled: bool,
/// The delay in milliseconds that must elapse before drag and drop is allowed. Otherwise, a new text selection is created.
///
/// Default: 300
pub delay: DelayMs,
}
/// Default options for buffer and project search items.
#[derive(Copy, Clone, Def... | ```suggestion
/// Show search results on input.
``` | #[derive(Copy, Clone, Default, Debug, PartialEq, Eq)]
pub struct DragAndDropSelection {
/// When true, enables drag and drop text selection in buffer.
///
/// Default: true
pub enabled: bool,
/// The delay in milliseconds that must elapse before drag and drop is allowed. Otherwise, a new text selec... | @@ -172,6 +172,8 @@ pub struct SearchSettings {
pub regex: bool,
/// Whether to center the cursor on each search match when navigating.
pub center_on_match: bool,
+ /// Show search results on input by default. | crates/editor/src/editor_settings.rs | 26 | Rust | 0.857 | suggestion | 55 | 51 | 51 | false | Add search_on_input setting to Project Search | 42,889 | zed-industries/zed | 59,345 | Rust | SomeoneToIgnore | holoflash |
});
editor_cx.assert_editor_state("«ˇfoo»\n«ˇFOO»\nFoo\nfoo");
}
fn update_search_settings(search_settings: SearchSettings, cx: &mut TestAppContext) {
cx.update(|cx| {
SettingsStore::update_global(cx, |store, cx| {
store.update_user_settings(cx, |settings| {
... | Can we remove the comments that verbatim describe the code just below them?
Here and in other places. | search_options: Some(SearchOptions::REGEX),
replacement_text: r"$1\n",
replace_all: true,
expected_text: r#"
A regular \n (shortened as regex \
\\ regexp;[1] also referred to as
rational \n[2][3]) is a sequence of characters that
... | @@ -3112,9 +3115,96 @@ mod tests {
include_ignored: Some(search_settings.include_ignored),
regex: Some(search_settings.regex),
center_on_match: Some(search_settings.center_on_match),
+ search_on_input: Some(search_settings... | crates/search/src/buffer_search.rs | 26 | Rust | 0.5 | question | 101 | 51 | 51 | false | Add search_on_input setting to Project Search | 42,889 | zed-industries/zed | 59,345 | Rust | SomeoneToIgnore | holoflash |
}
.join("zed")
} else if cfg!(target_os = "windows") {
dirs::data_local_dir()
.expect("failed to determine LocalAppData directory")
.join("Zed")
} else {
config_dir().clone() // Fallback
}
})
}
pub fn state_dir(... | ```suggestion
return if let Ok(flatpak_xdg_state) = std::env::var("FLATPAK_XDG_STATE_HOME") {
flatpak_xdg_state.into()
``` | dirs::data_local_dir().expect("failed to determine XDG_DATA_HOME directory")
}
.join("zed")
} else if cfg!(target_os = "windows") {
dirs::data_local_dir()
.expect("failed to determine LocalAppData directory")
.join("Zed")
... | @@ -126,6 +126,33 @@ pub fn data_dir() -> &'static PathBuf {
})
}
+pub fn state_dir() -> &'static PathBuf {
+ static STATE_DIR: OnceLock<PathBuf> = OnceLock::new();
+ STATE_DIR.get_or_init(|| {
+ if cfg!(target_os = "macos") {
+ return dirs::home_dir()
+ .expect("failed to... | crates/paths/src/paths.rs | 26 | Rust | 1 | suggestion | 150 | 51 | 51 | false | Fix text_threads_dir() non-compliance with XDG spec | 45,771 | zed-industries/zed | 59,345 | Rust | AdamJedl | maekilae |
custom_dir.clone()
} else if cfg!(target_os = "macos") {
home_dir().join("Library/Application Support/Zed")
} else if cfg!(any(target_os = "linux", target_os = "freebsd")) {
if let Ok(flatpak_xdg_data) = std::env::var("FLATPAK_XDG_DATA_HOME") {
flatpak... | ```suggestion
return home_dir()
``` | if let Some(custom_dir) = CUSTOM_DATA_DIR.get() {
custom_dir.clone()
} else if cfg!(target_os = "macos") {
home_dir().join("Library/Application Support/Zed")
} else if cfg!(any(target_os = "linux", target_os = "freebsd")) {
if let Ok(flatpak_xdg_data) = std::e... | @@ -126,6 +126,33 @@ pub fn data_dir() -> &'static PathBuf {
})
}
+pub fn state_dir() -> &'static PathBuf {
+ static STATE_DIR: OnceLock<PathBuf> = OnceLock::new();
+ STATE_DIR.get_or_init(|| {
+ if cfg!(target_os = "macos") {
+ return dirs::home_dir()
+ .expect("failed to... | crates/paths/src/paths.rs | 26 | Rust | 0.786 | suggestion | 47 | 51 | 51 | false | Fix text_threads_dir() non-compliance with XDG spec | 45,771 | zed-industries/zed | 59,345 | Rust | AdamJedl | maekilae |
} else if cfg!(any(target_os = "linux", target_os = "freebsd")) {
if let Ok(flatpak_xdg_data) = std::env::var("FLATPAK_XDG_DATA_HOME") {
flatpak_xdg_data.into()
} else {
dirs::data_local_dir().expect("failed to determine XDG_DATA_HOME directory")
... | Shouldn't this be `XDG_STATE_HOME`? | } else if cfg!(any(target_os = "linux", target_os = "freebsd")) {
if let Ok(flatpak_xdg_data) = std::env::var("FLATPAK_XDG_DATA_HOME") {
flatpak_xdg_data.into()
} else {
dirs::data_local_dir().expect("failed to determine XDG_DATA_HOME directory")
... | @@ -127,6 +127,29 @@ pub fn data_dir() -> &'static PathBuf {
})
}
+pub fn state_dir() -> &'static PathBuf {
+ static STATE_DIR: OnceLock<PathBuf> = OnceLock::new();
+ STATE_DIR.get_or_init(|| {
+ if cfg!(target_os = "macos") {
+ return home_dir().join(".local").join("state").join("Zed");... | crates/paths/src/paths.rs | 26 | Rust | 0.5 | question | 35 | 51 | 51 | false | Fix text_threads_dir() non-compliance with XDG spec | 45,771 | zed-industries/zed | 59,345 | Rust | hferreiro | maekilae |
extension_snippet::init(cx);
}
/// Language name, or `None` if the snippet file is global.
type SnippetKind = Option<String>;
fn file_stem_to_key(stem: &str) -> SnippetKind {
if stem == "snippets" {
None
} else {
Some(stem.to_owned())
}
}
fn file_to_snippets(file_contents: VsSnippetsFi... | ```suggestion
.with_context(|| format!("invalid snippet '{name}' in {source:?}"))
```
Can we
* reword the error a bit to make it more obvious where the snippet name is (not sure if single quotes around are good, just proposing)?
* do a
```rs
if let Err(e) = snippet::Snippet::parse(&body) {
log::err... | }
/// Language name, or `None` if the snippet file is global.
type SnippetKind = Option<String>;
fn file_stem_to_key(stem: &str) -> SnippetKind {
if stem == "snippets" {
None
} else {
Some(stem.to_owned())
}
}
fn file_to_snippets(file_contents: VsSnippetsFile, source: &Path) -> Vec<Arc<Sni... | @@ -43,7 +43,11 @@ fn file_to_snippets(file_contents: VsSnippetsFile) -> Vec<Arc<Snippet>> {
.description
.map(|description| description.to_string());
let body = snippet.body.to_string();
- if snippet::Snippet::parse(&body).log_err().is_none() {
+ if snippet::Snippet::pa... | crates/snippet_provider/src/lib.rs | 26 | Rust | 1 | suggestion | 496 | 51 | 51 | false | Improve snippet parse error context | 46,277 | zed-industries/zed | 59,345 | Rust | SomeoneToIgnore | oscarvarto |
}
pub fn create_terminal_shell(
&mut self,
cwd: Option<PathBuf>,
cx: &mut Context<Self>,
) -> Task<Result<Entity<Terminal>>> {
self.create_terminal_shell_internal(cwd, false, cx)
}
/// Creates a local terminal even if the project is remote.
/// Used for "breakin... | Seeing this, that means if one uses the local terminal creation action in a local project one will not get a relevant working directory either way (despite having one available in theory). I feel like it'd be nice to make that work? | }
pub fn create_terminal_shell(
&mut self,
cwd: Option<PathBuf>,
cx: &mut Context<Self>,
) -> Task<Result<Entity<Terminal>>> {
self.create_terminal_shell_internal(cwd, false, cx)
}
/// Creates a local terminal even if the project is remote.
/// In remote project... | @@ -281,9 +281,32 @@ impl Project {
&mut self,
cwd: Option<PathBuf>,
cx: &mut Context<Self>,
+ ) -> Task<Result<Entity<Terminal>>> {
+ self.create_terminal_shell_internal(cwd, false, cx)
+ }
+
+ /// Creates a local terminal even if the project is remote.
+ /// Used for "bre... | crates/project/src/terminals.rs | 26 | Rust | 0.571 | question | 232 | 51 | 51 | false | remote: Support local terminals in remote projects | 46,532 | zed-industries/zed | 59,345 | Rust | Veykril | baldwindavid |
MentionUri::Fetch { url } => {
cx.open_url(url.as_str());
}
MentionUri::PastedImage | MentionUri::Selection { abs_path: None, .. } => {}
});
}
fn open_file(
workspace: &mut Workspace,
abs_path: PathBuf,
window: &mut Window,
cx: &mut Context<Workspace>,
) {
le... | Let's de-dup open_file and open_file_at_location by passing `line_range` as an option | line_range,
} => {
open_file(workspace, abs_path, Some(line_range), window, cx);
}
MentionUri::Directory { abs_path } => {
reveal_in_project_panel(workspace, abs_path, cx);
}
MentionUri::Thread { id, name } => {
open_thread(workspac... | @@ -98,3 +130,189 @@ impl RenderOnce for MentionCrease {
)
}
}
+
+fn open_mention_uri(
+ mention_uri: MentionUri,
+ workspace: &WeakEntity<Workspace>,
+ window: &mut Window,
+ cx: &mut App,
+) {
+ let Some(workspace) = workspace.upgrade() else {
+ return;
+ };
+
+ workspac... | crates/agent_ui/src/ui/mention_crease.rs | 26 | Rust | 0.357 | suggestion | 85 | 51 | 51 | false | agent_ui: Make file mention chips clickable to open files | 46,751 | zed-industries/zed | 59,345 | Rust | bennetbo | soyllamas |
let font_size = settings.agent_buffer_font_size(cx);
let buffer_font = settings.buffer_font.clone();
let button_height = DefiniteLength::Absolute(AbsoluteLength::Pixels(
px(window.line_height().into()) - px(1.),
));
ButtonLike::new(self.id)
.style(Button... | ```suggestion
. .when_some(
self.mention_uri.clone().zip(self.workspace.clone()),
|this, (mention_uri, workspace)| {
this.on_click(move |_event, window, cx| {
open_mention_uri(mention_uri.clone(), &workspace, window, cx);
... | self
}
}
impl RenderOnce for MentionCrease {
fn render(self, window: &mut Window, cx: &mut App) -> impl IntoElement {
let settings = ThemeSettings::get_global(cx);
let font_size = settings.agent_buffer_font_size(cx);
let buffer_font = settings.buffer_font.clone();
let is... | @@ -69,6 +91,16 @@ impl RenderOnce for MentionCrease {
.when_some(self.image_preview, |this, image_preview| {
this.hoverable_tooltip(image_preview)
})
+ .when(
+ self.mention_uri.is_some() && self.workspace.is_some(),
+ |this| {
+ ... | crates/agent_ui/src/ui/mention_crease.rs | 26 | Rust | 1 | suggestion | 378 | 51 | 51 | false | agent_ui: Make file mention chips clickable to open files | 46,751 | zed-industries/zed | 59,345 | Rust | bennetbo | soyllamas |
fn labels_for_match(
&self,
path_match: &Match,
window: &mut Window,
cx: &App,
) -> (HighlightedLabel, HighlightedLabel) {
let path_style = self.project.read(cx).path_style(cx);
let (file_name, file_name_positions, mut full_path, mut full_path_positions) =
... | Let's restructure to have this code like `let full_path = if ProjectPanelSettings::get_global(cx).hide_root {....`-like form, so we do 1 allocation instead of 2 here, per each history entry. |
fn labels_for_match(
&self,
path_match: &Match,
window: &mut Window,
cx: &App,
) -> (HighlightedLabel, HighlightedLabel) {
let path_style = self.project.read(cx).path_style(cx);
let (file_name, file_name_positions, mut full_path, mut full_path_positions) =
... | @@ -1049,8 +1050,12 @@ impl FileFinderDelegate {
if let Some(panel_match) = panel_match {
self.labels_for_path_match(&panel_match.0, path_style)
} else if let Some(worktree) = worktree {
- let full_path =
+ ... | crates/file_finder/src/file_finder.rs | 26 | Rust | 0.714 | suggestion | 190 | 51 | 51 | false | file_finder: Remove project's root name from the file finder history | 46,957 | zed-industries/zed | 59,345 | Rust | SomeoneToIgnore | CCXLV |
let is_local = project.read(cx).is_local();
let project_item =
<T::Item as project::ProjectItem>::try_open(project, &project_path, cx)?;
let project = project.clone();
Some(window.spawn(cx, async move |cx| {
match pr... | That handler was just removed without any counterpart added??? | prompt_for_open_path_and_open(workspace, app_state, options, window, cx);
});
})?;
anyhow::Ok(())
})
.detach_and_log_err(cx);
}
}
pub fn prompt_for_open_path_and_open(
workspace: &mut Workspace,
app_state: Arc<AppState>,
option... | @@ -584,79 +584,14 @@ impl From<WorkspaceId> for i64 {
}
}
-fn prompt_and_open_paths(app_state: Arc<AppState>, options: PathPromptOptions, cx: &mut App) {
- let paths = cx.prompt_for_paths(options);
- cx.spawn(
- async move |cx| match paths.await.anyhow().and_then(|res| res) {
- Ok(Some(... | crates/workspace/src/workspace.rs | 26 | Rust | 0.643 | question | 62 | 51 | 51 | false | Fix `OpenFiles` action not respecting `use_system_path_prompts` setting | 47,027 | zed-industries/zed | 59,345 | Rust | SomeoneToIgnore | austincummings |
'1' // protected
} else {
'0' // public
};
let is_external = item
.detail
.as_ref()
.is_some_and(|detail| detail == "Auto-import");
let source_priority = if is_external { '1' } else { '0' };
// Kind priority within sa... | PR looks good. Can we remove this redudant arm? I think then it's good to go. This is much better than what we had previously. | '1' // protected
} else {
'0' // public
};
let is_external = item
.detail
.as_ref()
.is_some_and(|detail| detail == "Auto-import");
let source_priority = if is_external { '1' } else { '0' };
// Kind priority within sa... | @@ -124,23 +126,36 @@ fn process_pyright_completions(items: &mut [lsp::CompletionItem]) {
'0' // public
};
+ let is_external = item
+ .detail
+ .as_ref()
+ .is_some_and(|detail| detail == "Auto-import");
+
+ let source_priority = if is_external { '1... | crates/languages/src/python.rs | 26 | Rust | 0.5 | refactor | 126 | 51 | 51 | false | languages: Improve completion sorting for Python-based LSPs | 47,160 | zed-industries/zed | 59,345 | Rust | smitbarmase | lingyaochu |
}
/// Returns the primary [`Language`] assigned to this [`Buffer`].
pub fn language(&self) -> Option<&Arc<Language>> {
self.language.as_ref()
}
/// Returns the [`Language`] at the given location.
pub fn language_at<D: ToOffset>(&self, position: D) -> Option<Arc<Language>> {
let... | Extracted that as `offset_in_sub_ranges` since I need it in multiple places. |
/// Returns the [`Language`] at the given location.
pub fn language_at<D: ToOffset>(&self, position: D) -> Option<Arc<Language>> {
let offset = position.to_offset(self);
let text: &TextBufferSnapshot = &self.text;
self.syntax_map
.lock()
.layers_for_range(offset.... | @@ -1714,28 +1708,14 @@ impl Buffer {
/// Returns the [`Language`] at the given location.
pub fn language_at<D: ToOffset>(&self, position: D) -> Option<Arc<Language>> {
let offset = position.to_offset(self);
- let mut is_first = true;
- let start_anchor = self.anchor_before(offset);
- ... | crates/language/src/buffer.rs | 26 | Rust | 0.571 | refactor | 76 | 51 | 51 | false | language: Respect combined injection sub-ranges for language queries | 48,522 | zed-industries/zed | 59,345 | Rust | vitallium | vitallium |
/// Returns the primary [`Language`] assigned to this [`Buffer`].
pub fn language(&self) -> Option<&Arc<Language>> {
self.language.as_ref()
}
/// Returns the [`Language`] at the given location.
pub fn language_at<D: ToOffset>(&self, position: D) -> Option<Arc<Language>> {
let offset... | HTML+ERB is quite tricky language since it:
- Defines itself as `HTML+ERB` language
- Injects HTML
- Injects Ruby
Let's take the following example:
```erb
<div>Hello</div>
<%= yield %>
<p>World</p>
```
- HTML+ERB lang is active in `<%|`
- HTML lang is active in `<div>Hello</div>` and `<p>World</p>`.
- Ruby lang is ... | pub fn language_at<D: ToOffset>(&self, position: D) -> Option<Arc<Language>> {
let offset = position.to_offset(self);
let text: &TextBufferSnapshot = &self.text;
self.syntax_map
.lock()
.layers_for_range(offset..offset, text, false)
.filter(|layer| {
... | @@ -1745,10 +1725,17 @@ impl Buffer {
/// Returns each [`Language`] for the active syntax layers at the given location.
pub fn languages_at<D: ToOffset>(&self, position: D) -> Vec<Arc<Language>> {
let offset = position.to_offset(self);
+ let text: &TextBufferSnapshot = &self.text;
let... | crates/language/src/buffer.rs | 26 | Rust | 1 | bug | 613 | 51 | 51 | false | language: Respect combined injection sub-ranges for language queries | 48,522 | zed-industries/zed | 59,345 | Rust | vitallium | vitallium |
assert_eq!(language.name().as_ref(), "Ruby");
buffer
});
}
#[gpui::test]
fn test_serialization(cx: &mut gpui::App) {
let mut now = Instant::now();
let buffer1 = cx.new(|cx| {
let mut buffer = Buffer::local("abc", cx);
buffer.edit([(3..3, "D")], None, cx);
now += D... | Copy&pasted both tests, I hope that's OK? :D | let language = snapshot.language_at(ruby_point).unwrap();
assert_eq!(
language.name().as_ref(),
"Ruby",
"Expected Ruby at {:?}, got {}",
ruby_point,
language.name()
);
// Test language_at for HTML after Ruby (line 2: "<p>World<... | @@ -2894,15 +2891,80 @@ fn test_language_at_for_markdown_code_block(cx: &mut App) {
}
#[gpui::test]
-fn test_syntax_layer_at_for_injected_languages(cx: &mut App) {
+fn test_syntax_layer_at_for_combined_injections(cx: &mut App) {
init_settings(cx, |_| {});
cx.new(|cx| {
+ // ERB template with HTML... | crates/language/src/buffer_tests.rs | 26 | Rust | 0.071 | suggestion | 45 | 51 | 51 | false | language: Respect combined injection sub-ranges for language queries | 48,522 | zed-industries/zed | 59,345 | Rust | vitallium | vitallium |
cx: &mut App,
) -> AnyView {
cx.new(|cx| ConfigurationView::new(self.state.clone(), window, cx))
.into()
}
fn reset_credentials(&self, cx: &mut App) -> Task<Result<()>> {
self.state
.update(cx, |state, cx| state.set_api_key(None, cx))
}
}
pub struct Mist... | `cx’ should be the last parameter to the function. | window: &mut Window,
cx: &mut App,
) -> AnyView {
cx.new(|cx| ConfigurationView::new(self.state.clone(), window, cx))
.into()
}
fn reset_credentials(&self, cx: &mut App) -> Task<Result<()>> {
self.state
.update(cx, |state, cx| state.set_api_key(None, ... | @@ -225,6 +225,7 @@ impl MistralLanguageModel {
&self,
request: mistral::Request,
cx: &AsyncApp,
+ affinity: Option<String>, | crates/language_models/src/provider/mistral.rs | 26 | Rust | 0.571 | suggestion | 50 | 51 | 51 | false | mistral: Add x-affinity header | 48,584 | zed-industries/zed | 59,345 | Rust | maxdeviant | vianney |
.lock()
.paths_by_item
.remove(&item.item_id());
}
if self.zoom_out_on_close && self.items.is_empty() && close_pane_if_empty && self.zoomed {
cx.emit(Event::ZoomOut);
}
cx.notify();
}
pub async fn save_item(
p... | This logic seems to be wrong?
1. `can_save` returns `true` for a multi buffer: https://github.com/zed-industries/zed/blob/44015e0379b6c868258318d9c159134adbf801d9/crates/editor/src/items.rs#L847-L854
2. MutliBuffer's reload will reload all its contents: https://github.com/zed-industries/zed/blob/44015e0379b6c868258318... |
if let Some(path) = item.project_path(cx) {
let abs_path = self
.nav_history
.0
.lock()
.paths_by_item
.get(&item.item_id())
.and_then(|(_, abs_path)| abs_path.clone());
self.nav_history
... | @@ -2184,6 +2184,12 @@ impl Pane {
let path_style = project.read_with(cx, |project, cx| project.path_style(cx));
if save_intent == SaveIntent::Skip {
+ let can_save = cx.update(|_window, cx| item.can_save(cx))?; | crates/workspace/src/pane.rs | 26 | Rust | 0.643 | bug | 564 | 51 | 51 | false | Fix discard not reloading buffer from disk | 48,936 | zed-industries/zed | 59,345 | Rust | SomeoneToIgnore | TomPlanche |
assert_eq!(items[2].depth, 1);
assert_eq!(items[2].text, "baz");
assert_eq!(items[2].name_ranges, vec![0..3]);
assert_eq!(items[3].depth, 0);
assert_eq!(items[3].text, "impl Foo");
assert_eq!(items[3].name_ranges, vec![5..8]);
assert_eq!(items[4].depth, 1);
... | Can we not test some private function, but rather add a few examples right into LSP response of any of the outline/outline panel tests to see the whole pipeline passing through and sanitizing those LSP responses? | assert_eq!(items[2].depth, 1);
assert_eq!(items[2].text, "baz");
assert_eq!(items[2].name_ranges, vec![0..3]);
assert_eq!(items[3].depth, 0);
assert_eq!(items[3].text, "impl Foo");
assert_eq!(items[3].name_ranges, vec![5..8]);
assert_eq!(items[4].depth, 1);
... | @@ -454,4 +450,44 @@ mod tests {
flatten_document_symbols(&symbols, &snapshot, 0, &mut items);
assert!(items.is_empty());
}
+
+ #[test]
+ fn test_collapse_newlines() { | crates/project/src/lsp_store/document_symbols.rs | 26 | Rust | 0.357 | question | 212 | 51 | 51 | false | lsp: Sanitize newlines in document and workspace symbol names | 49,092 | zed-industries/zed | 59,345 | Rust | SomeoneToIgnore | aviatesk |
#[error("error serializing request to {provider} API")]
SerializeRequest {
provider: LanguageModelProviderName,
#[source]
error: serde_json::Error,
},
#[error("error building request body to {provider} API")]
BuildRequestBody {
provider: LanguageModelProviderName,
... | We shouldn't use "Cloud" in our public-facing messaging, as it's our internal name and users aren't expected to know what it is.
I think omitting that part is fine:
```suggestion
#[error("stream from {provider} ended unexpectedly")]
``` | #[error("error serializing request to {provider} API")]
SerializeRequest {
provider: LanguageModelProviderName,
#[source]
error: serde_json::Error,
},
#[error("error building request body to {provider} API")]
BuildRequestBody {
provider: LanguageModelProviderName,
... | @@ -212,6 +213,9 @@ pub enum LanguageModelCompletionError {
error: serde_json::Error,
},
+ #[error("stream from {provider} over cloud ended unexpectedly")] | crates/language_model/src/language_model.rs | 26 | Rust | 1 | suggestion | 242 | 51 | 51 | false | cloud_llm_client: Add StreamEnded and Unknown variants to CompletionRequestStatus | 49,121 | zed-industries/zed | 59,345 | Rust | maxdeviant | tomhoule |
let Some(current_logical_index) = state
.logical_indices
.iter()
.position(|&i| i == selected_entry)
else {
return;
};
let Some(new_index) = state
.logical... | This check seems redundant:
* in `GitPanelViewMode::Flat`, we already check for this
* in `GitPanelViewMode::Tree`, next entry is bound by `logical_indices` precludes this case
Lemme know if I missed something though! Also, your test does not account for this which strengthens my belief that this check is redundant. | let Some(current_logical_index) = state
.logical_indices
.iter()
.position(|&i| i == selected_entry)
else {
return;
};
let Some(new_index) = state
.logical... | @@ -1127,12 +1129,24 @@ impl GitPanel {
return;
};
- state.logical_indices[current_logical_index.saturating_add(1)]
+ let Some(new_index) = state
+ .logical_indices
+ .get(current_logical_index.saturating_add(1))... | crates/git_ui/src/git_panel.rs | 26 | Rust | 0.857 | suggestion | 317 | 51 | 51 | false | git_ui: Fix tree view next selection out of bounds | 49,283 | zed-industries/zed | 59,345 | Rust | kubkon | errmayank |
assert!(state.logical_indices.contains(&selected_ix));
let selected_entry = panel
.entries
.get(selected_ix)
.and_then(|entry| entry.status_entry())
.expect("selected entry should be a status entry");
assert_eq!(selecte... | Looks good! I would suggest we strive to replicate @mchisolm0's repro with one twist - let's add a `GitHeader` entry into the mix, so something like this:
```
Tracked
bar/
bar1.py
bar2.py
foo/
foo1.py
foo2.py
Untracked
foobar.py
``` | .get(selected_ix)
.and_then(|entry| entry.status_entry())
.expect("selected entry should be a status entry");
assert_eq!(selected_entry.repo_path, repo_path("src/a/foo.rs"));
});
}
#[gpui::test]
async fn test_tree_view_select_next_at_last_... | @@ -7211,6 +7225,127 @@ mod tests {
});
}
+ #[gpui::test]
+ async fn test_tree_view_select_next_at_last_visible_collapsed_directory(
+ cx: &mut TestAppContext,
+ ) {
+ init_test(cx);
+
+ let fs = FakeFs::new(cx.background_executor.clone());
+ fs.insert_tree(
+ ... | crates/git_ui/src/git_panel.rs | 26 | Rust | 1 | suggestion | 241 | 51 | 51 | false | git_ui: Fix tree view next selection out of bounds | 49,283 | zed-industries/zed | 59,345 | Rust | kubkon | errmayank |
use core::slice;
use std::ffi::{CStr, c_void};
use std::path::PathBuf;
use cocoa::{
appkit::{
NSFilenamesPboardType, NSPasteboard, NSPasteboardTypePNG, NSPasteboardTypeString,
NSPasteboardTypeTIFF,
},
base::{id, nil},
foundation::{NSData, NSFastEnumeration, NSString},
};
use objc::{msg_... | This seems to be pulled in from another PR and unrelated to the proposed changes here. | use core::slice;
use std::ffi::c_void;
use cocoa::{
appkit::{NSPasteboard, NSPasteboardTypePNG, NSPasteboardTypeString, NSPasteboardTypeTIFF},
base::{id, nil},
foundation::NSData,
};
use objc::{msg_send, runtime::Object, sel, sel_impl};
use strum::IntoEnumIterator as _;
use crate::{
ClipboardEntry, Cl... | crates/gpui/src/platform/mac/pasteboard.rs | 1 | Rust | 0.357 | suggestion | 86 | 26 | 26 | false | ci: Harden background-agent MVP git authentication loop | 49,373 | zed-industries/zed | 59,345 | Rust | MrSubidubi | morgankrey | |
}
pub fn submit_comments(&mut self, thread: Entity<AcpThread>, cx: &mut App) {
let thread = thread.read(cx);
let Some(telemetry) = thread.connection().telemetry() else {
return;
};
let Some(comments) = self
.comments_editor
.as_ref()
... | I refactored. the thread.read(cx) repeated calls to keep the thread in a variable, because it (at least visually and superficially) felt like. duplicated logic / work. LMK if that’s a bad idea or not consistent with the conventions. | }
pub fn submit_comments(&mut self, thread: Entity<AcpThread>, cx: &mut App) {
let Some(telemetry) = thread.read(cx).connection().telemetry() else {
return;
};
let Some(comments) = self
.comments_editor
.as_ref()
.map(|editor| editor.read... | @@ -84,18 +85,28 @@ impl ThreadFeedbackState {
self.comments_editor.take();
- let session_id = thread.read(cx).session_id().clone();
- let agent_telemetry_id = thread.read(cx).connection().telemetry_id();
+ let project = thread.project().read(cx);
+ let client = project.client()... | crates/agent_ui/src/acp/thread_view/active_thread.rs | 26 | Rust | 0.857 | refactor | 232 | 51 | 51 | false | agent_ui: Route agent thread feedback comments through cloud | 49,481 | zed-industries/zed | 59,345 | Rust | tomhoule | tomhoule |
window: &mut Window,
cx: &mut Context<Self>,
) -> Result<()> {
let worktree = project
.read(cx)
.worktree_for_entry(entry_id, cx)
.context("can't reveal a non-existent entry in the project panel")?;
let worktree = worktree.read(cx);
let wor... | Can we add `self.autoscroll(cx);` here too? | window: &mut Window,
cx: &mut Context<Self>,
) -> Result<()> {
let worktree = project
.read(cx)
.worktree_for_entry(entry_id, cx)
.context("can't reveal a non-existent entry in the project panel")?;
let worktree = worktree.read(cx);
let wor... | @@ -5966,12 +5966,26 @@ impl ProjectPanel {
.worktree_for_entry(entry_id, cx)
.context("can't reveal a non-existent entry in the project panel")?;
let worktree = worktree.read(cx);
- if skip_ignored
- && worktree
- .entry_for_id(entry_id)
- ... | crates/project_panel/src/project_panel.rs | 26 | Rust | 0.286 | question | 43 | 51 | 51 | false | project_panel: Fix selection not updating for already-visible gitignored files | 49,521 | zed-industries/zed | 59,345 | Rust | smitbarmase | skyline69 |
cx.emit(project::Event::ActiveEntryChanged(Some(dir_2_file)))
})
});
cx.run_until_parked();
panel.update(cx, |panel, cx| {
panel.project.update(cx, |_, cx| {
cx.emit(project::Event::ActiveEntryChanged(Some(
gitignored_dir_file,
)))
... | I think we should assert the immediate state here. It would be more thorough to assert that `dir_2_file` is selected and marked. That way we can confirm that switch actually happened. | cx.emit(project::Event::ActiveEntryChanged(Some(dir_2_file)))
})
});
cx.run_until_parked();
assert_eq!(
visible_entries_as_strings(&panel, 0..20, cx),
&[
"v project_root",
" > .git",
" v dir_1",
" v gitignored_d... | @@ -4843,6 +4843,43 @@ async fn test_autoreveal_and_gitignored_files(cx: &mut gpui::TestAppContext) {
],
"When a gitignored entry is explicitly revealed, it should be shown in the project tree"
);
+
+ panel.update(cx, |panel, cx| {
+ panel.project.update(cx, |_, cx| {
+ cx.em... | crates/project_panel/src/project_panel_tests.rs | 26 | Rust | 0.714 | suggestion | 183 | 51 | 51 | false | project_panel: Fix selection not updating for already-visible gitignored files | 49,521 | zed-industries/zed | 59,345 | Rust | smitbarmase | skyline69 |
self.marked_entries.push(SelectedEntry {
worktree_id,
entry_id,
});
self.autoscroll(cx);
cx.notify();
return Ok(());
}
let is_active_item_file_diff_view = self
.workspace
.upgrade()
... | Actually, we don't need auto scroll here because `self.update_visible_entries` handles that for us internally. It calls `auto scroll` since we pass `true`.
The reason we don't use `update_visible_entries` in our code path is because there we are not changing anything about entries visually, which, in this case, `expan... | self.marked_entries.push(SelectedEntry {
worktree_id,
entry_id,
});
self.autoscroll(cx);
cx.notify();
return Ok(());
}
let is_active_item_file_diff_view = self
.workspace
.upgrade()
... | @@ -5983,14 +5998,14 @@ impl ProjectPanel {
return Ok(());
}
- let worktree_id = worktree.id();
self.expand_entry(worktree_id, entry_id, cx);
self.update_visible_entries(Some((worktree_id, entry_id)), false, true, window, cx);
self.marked_entries.clear();
... | crates/project_panel/src/project_panel.rs | 26 | Rust | 1 | suggestion | 335 | 51 | 51 | false | project_panel: Fix selection not updating for already-visible gitignored files | 49,521 | zed-industries/zed | 59,345 | Rust | smitbarmase | skyline69 |
repository_id: repository_id.0,
oid: oid.to_string(),
})
.await?;
Ok(response.content)
}
}
});
cx.spawn(|_: &mut AsyncApp| async move { rx.await? })
... | I seem to remember discussing this with @cole-miller a while back and our conclusion was that this was needed to dedup `git-status` calls. Is that no longer the case? | RepositoryState::Local(LocalRepositoryState { backend, .. }) => {
backend.load_blob_content(oid).await
}
RepositoryState::Remote(RemoteRepositoryState { client, project_id }) => {
let response = client
.reque... | @@ -6197,24 +6190,16 @@ impl Repository {
updates_tx: Option<mpsc::UnboundedSender<DownstreamUpdate>>,
cx: &mut Context<Self>,
) {
- self.paths_needing_status_update.extend(paths);
- | crates/project/src/git_store.rs | 26 | Rust | 0.5 | question | 166 | 51 | 51 | false | project: Block less in `Respository::paths_changed` | 49,584 | zed-industries/zed | 59,345 | Rust | kubkon | Veykril |
let editor = window
.read_with(cx, |multi_workspace, cx| {
multi_workspace
.workspace()
.read(cx)
.active_item(cx)
.unwrap()
.downcast::<Editor>()
.unwrap()
... | This change was needed to get the test passing with the rest of the changes.
This test seems incredibly brittle, as currently written. |
let editor = window
.read_with(cx, |multi_workspace, cx| {
multi_workspace
.workspace()
.read(cx)
.active_item(cx)
.unwrap()
.downcast::<Editor>()
.unwrap()
... | @@ -2833,7 +2833,7 @@ mod tests {
assert!(window_is_edited(window, cx));
// Advance the clock to make sure the workspace is serialized
- cx.executor().advance_clock(Duration::from_secs(1));
+ cx.executor().advance_clock(Duration::from_secs(2)); | crates/zed/src/zed.rs | 26 | Rust | 0.5 | suggestion | 135 | 51 | 51 | false | Sign out upon receiving an Unauthorized response when acquiring an LLM token | 49,673 | zed-industries/zed | 59,345 | Rust | maxdeviant | maxdeviant |
match self.model.provider {
Anthropic => language_model::ANTHROPIC_PROVIDER_NAME,
OpenAi => language_model::OPEN_AI_PROVIDER_NAME,
Google => language_model::GOOGLE_PROVIDER_NAME,
XAi => language_model::X_AI_PROVIDER_NAME,
}
}
fn is_latest(&self) -... | This is for cloud. Do we also want this for opus 4.6 in BYOK? | match self.model.provider {
Anthropic => language_model::ANTHROPIC_PROVIDER_NAME,
OpenAi => language_model::OPEN_AI_PROVIDER_NAME,
Google => language_model::GOOGLE_PROVIDER_NAME,
XAi => language_model::X_AI_PROVIDER_NAME,
}
}
fn is_latest(&self) -... | @@ -571,6 +571,10 @@ impl LanguageModel for CloudLanguageModel {
self.model.supports_thinking
}
+ fn supports_fast_mode(&self) -> bool {
+ self.model.supports_fast_mode | crates/language_models/src/provider/cloud.rs | 26 | Rust | 0.143 | question | 61 | 51 | 51 | false | Add fast mode toggle in agent panel | 49,714 | zed-industries/zed | 59,345 | Rust | tomhoule | tomhoule |
Default::default();
let show_diagnostics_setting = ProjectPanelSettings::get_global(cx).show_diagnostics;
let diagnostic_badges = ProjectPanelSettings::get_global(cx).diagnostic_badges;
let mut diagnostic_counts: HashMap<(WorktreeId, Arc<RelPath>), (usize, usize)> =
Defau... | I don't think we need to accumulate diagnostic counts on parent directories. The existing icon decoration already tells you "something in here has diagnostics," and that's sufficient. The actual count on a directory doesn't help much because you still need to drill into files to fix them. I think its just adds visual n... | .context("loading project panel")
.log_err()
.flatten()
.map(|panel| serde_json::from_str::<SerializedProjectPanel>(&panel))
.transpose()
.log_err()
.flatten(),
None => None,
};
w... | @@ -1000,35 +1003,66 @@ impl ProjectPanel {
let mut diagnostics: HashMap<(WorktreeId, Arc<RelPath>), DiagnosticSeverity> =
Default::default();
let show_diagnostics_setting = ProjectPanelSettings::get_global(cx).show_diagnostics; | crates/project_panel/src/project_panel.rs | 26 | Rust | 0.857 | suggestion | 479 | 51 | 51 | false | project_panel: Add diagnostic count badges and color priority | 49,802 | zed-industries/zed | 59,345 | Rust | smitbarmase | davidescaccia |
.when(
canonical_path.is_some() || diagnostic_counts.is_some(),
|this| {
let symlink_element = canonical_path.map(|path| {
div()
.id("symlink_icon")
... | We should cap the displayed count so it doesn't take up too much horizontal space. Something like 99+ for anything over 99. | project_panel.open_entry(entry_id, focus_opened_item, allow_preview, cx);
}
}),
)
.child(
ListItem::new(id)
.indent_level(depth)
.indent_step_size(px(settings.indent_size))
... | @@ -5482,22 +5517,55 @@ impl ProjectPanel {
ProjectPanelEntrySpacing::Standard => ListItemSpacing::ExtraDense,
})
.selectable(false)
- .when_some(canonical_path, |this, path| {
- this.end_slot::<AnyElement>(
- ... | crates/project_panel/src/project_panel.rs | 26 | Rust | 0.5 | suggestion | 123 | 51 | 51 | false | project_panel: Add diagnostic count badges and color priority | 49,802 | zed-industries/zed | 59,345 | Rust | smitbarmase | davidescaccia |
entry
.path
.file_name()
.map(|name| name.to_string())
.unwrap_or_else(|| root_name.as_unix_str().to_string())
};
let selection = SelectedEntry {
worktree_id,
entry_id: entry.id,
};
let i... | I think we should drop the filename color override from this PR. Right now git status is communicated solely through filename text color, there's no other indicator for it. If we override that with diagnostic severity, the user loses git status information entirely.
The right path would be: a separate PR adds git stat... |
let path_style = self.project.read(cx).path_style(cx);
let (depth, difference) =
ProjectPanel::calculate_depth_and_difference(entry, entries_paths);
let filename = if difference > 1 {
entry
.path
.last_n_components(difference)
... | @@ -5907,8 +5975,21 @@ impl ProjectPanel {
.get(&(worktree_id, entry.path.clone()))
.cloned();
- let filename_text_color =
- entry_git_aware_label_color(git_status, entry.is_ignored, is_marked);
+ let diagnostic_counts = self
+ .diagnostic_counts
+ ... | crates/project_panel/src/project_panel.rs | 26 | Rust | 0.643 | style | 566 | 51 | 51 | false | project_panel: Add diagnostic count badges and color priority | 49,802 | zed-industries/zed | 59,345 | Rust | smitbarmase | davidescaccia |
CommitView::open(
commit_entry.data.sha.to_string(),
repository.downgrade(),
self.workspace.clone(),
None,
None,
window,
cx,
);
}
fn get_remote(
&self,
repository: &Repository,
_window: ... | We should probably make a hash map of commit shas to their row in the graph, it will be needed for git search as well. This isn't a blocker, just something to add to our todo list in the future | self._commit_diff_task = Some(cx.spawn(async move |this, cx| {
if let Ok(Ok(diff)) = diff_receiver.await {
this.update(cx, |this, cx| {
let stats = compute_diff_stats(&diff);
this.selected_commit_diff = Some(diff);
this.sele... | @@ -1153,6 +1189,37 @@ impl GitGraph {
cx.notify();
}
+ pub fn select_commit_by_sha(&mut self, sha: &str, cx: &mut Context<Self>) {
+ let Ok(oid) = sha.parse::<Oid>() else {
+ return;
+ };
+ for (idx, commit) in self.graph_data.commits.iter().enumerate() {
+ ... | crates/git_graph/src/git_graph.rs | 26 | Rust | 0.5 | suggestion | 193 | 51 | 51 | false | git_ui: Improve connection between the graph and commit views | 50,027 | zed-industries/zed | 59,345 | Rust | Anthony-Eid | danilo-leal |
}
_ => {}
}
}
fn fetch_initial_graph_data(&mut self, cx: &mut App) {
if let Some(repository) = self.get_selected_repository(cx) {
repository.update(cx, |repository, cx| {
let (commits, _) = repository.graph_data(
self.log_s... | I think we can avoid having `PENDING_SELECT_MAX_RETRIES` in retry_pending select.
`repository.graph_data(...).1` is true if the graph is still loading commits, we can clear the pending selection if it's false and we haven't found the commit a user wants to see |
this.fetch_initial_graph_data(cx);
this
}
fn on_repository_event(
&mut self,
repository: Entity<Repository>,
event: &RepositoryEvent,
cx: &mut Context<Self>,
) {
match event {
RepositoryEvent::GitGraphCountUpdated((order, source), commit_... | @@ -944,8 +978,10 @@ impl GitGraph {
self.graph_data.add_commits(commits);
});
cx.notify();
+ self.retry_pending_select(cx); | crates/git_graph/src/git_graph.rs | 26 | Rust | 0.786 | suggestion | 263 | 51 | 51 | false | git_ui: Improve connection between the graph and commit views | 50,027 | zed-industries/zed | 59,345 | Rust | Anthony-Eid | danilo-leal |
impl ContextServerConfiguration {
pub fn command(&self) -> Option<&ContextServerCommand> {
match self {
ContextServerConfiguration::Custom { command, .. } => Some(command),
ContextServerConfiguration::Extension { command, .. } => Some(command),
ContextServerConfiguration... | Is my understanding correct that the extension could be attempting an npm install during that command execution? If that’s the case, we have to bump this timeout (maybe 30 seconds?). |
impl ContextServerConfiguration {
pub fn command(&self) -> Option<&ContextServerCommand> {
match self {
ContextServerConfiguration::Custom { command, .. } => Some(command),
ContextServerConfiguration::Extension { command, .. } => Some(command),
ContextServerConfiguration... | @@ -141,6 +141,8 @@ impl ContextServerConfiguration {
worktree_store: Entity<WorktreeStore>,
cx: &AsyncApp,
) -> Option<Self> {
+ const EXTENSION_COMMAND_TIMEOUT: Duration = Duration::from_secs(10); | crates/project/src/context_server_store.rs | 26 | Rust | 0.5 | suggestion | 182 | 51 | 51 | false | Fix "add custom context server" modal hanging indefinitely | 50,085 | zed-industries/zed | 59,345 | Rust | tomhoule | tomhoule |
let globals_buffer = device.create_buffer(&wgpu::BufferDescriptor {
label: Some("globals_buffer"),
size: gamma_offset + gamma_size,
usage: wgpu::BufferUsages::UNIFORM | wgpu::BufferUsages::COPY_DST,
mapped_at_creation: false,
});
let storage_buff... | The second stacktrace you posted says the panic happens inside this `create_path_intermediate(...)` call, so this PR won't fix that I think. Maybe you should start with both intermediates set to `None` here and let first actual draw call handle the creation. |
let rendering_params = RenderingParameters::new(&context.adapter, surface_format);
let bind_group_layouts = Self::create_bind_group_layouts(&device);
let pipelines = Self::create_pipelines(
&device,
&bind_group_layouts,
surface_format,
alpha_mode,... | @@ -271,12 +271,15 @@ impl WgpuRenderer {
mapped_at_creation: false,
});
- let (path_intermediate_texture, path_intermediate_view) = Self::create_path_intermediate(
- &device,
- surface_format,
- config.size.width.0 as u32,
- config.size.height.... | crates/gpui_wgpu/src/wgpu_renderer.rs | 26 | Rust | 1 | suggestion | 258 | 51 | 51 | false | Avoid panicking in wgpu rendering during resize | 50,169 | zed-industries/zed | 59,345 | Rust | zortax | ConradIrwin |
#[allow(dead_code)]
pub fn viewport_size(&self) -> Size<DevicePixels> {
Size {
width: DevicePixels(self.surface_config.width as i32),
height: DevicePixels(self.surface_config.height as i32),
}
}
pub fn sprite_atlas(&self) -> &Arc<WgpuAtlas> {
&self.atlas
... | Maybe its worth it to use something like [device.push_error_scope(...)](https://docs.rs/wgpu/latest/wgpu/struct.Device.html#method.push_error_scope) to handle any validation errors more gracefully instead of panicking? | }
let (path_intermediate_texture, path_intermediate_view) = {
let (t, v) = Self::create_path_intermediate(
&self.device,
self.surface_config.format,
self.surface_config.width,
self.surface_config.height,
);
... | @@ -780,28 +783,44 @@ impl WgpuRenderer {
self.surface_config.height = height.max(1);
self.surface.configure(&self.device, &self.surface_config);
- let (path_intermediate_texture, path_intermediate_view) =
- Self::create_path_intermediate(
- &self... | crates/gpui_wgpu/src/wgpu_renderer.rs | 26 | Rust | 0.857 | question | 218 | 51 | 51 | false | Avoid panicking in wgpu rendering during resize | 50,169 | zed-industries/zed | 59,345 | Rust | zortax | ConradIrwin |
fn draw_paths_from_intermediate(
&self,
paths: &[Path<ScaledPixels>],
instance_offset: &mut u64,
pass: &mut wgpu::RenderPass<'_>,
) -> bool {
let first_path = &paths[0];
let sprites: Vec<PathSprite> = if paths.last().map(|p| &p.order) == Some(&first_path.order)
... | I think the semantics are wrong here. Returning false means instance buffer overflow and would cause the calling side to grow the instance buffer and retry the frame. I believe this should just return true if don't have path_intermediate_view to skip paths. | pass.draw(0..4, 0..instance_count);
true
}
fn draw_instances_with_texture(
&self,
data: &[u8],
instance_count: u32,
texture_view: &wgpu::TextureView,
pipeline: &wgpu::RenderPipeline,
instance_offset: &mut u64,
pass: &mut wgpu::RenderPass<'... | @@ -1249,11 +1272,15 @@ impl WgpuRenderer {
vec![PathSprite { bounds }]
};
+ let Some(path_intermediate_view) = self.path_intermediate_view.as_ref() else {
+ return false; | crates/gpui_wgpu/src/wgpu_renderer.rs | 26 | Rust | 0.857 | bug | 257 | 51 | 51 | false | Avoid panicking in wgpu rendering during resize | 50,169 | zed-industries/zed | 59,345 | Rust | zortax | ConradIrwin |
&& (extension == Some("yaml") || extension == Some("yml"))
{
if let Some(helm_icon) = this.get_icon_for_type("helm", cx) {
return Some(helm_icon);
}
}
// Check for templates directory pattern (Helm Charts)
if path_str.map_or(false, |p|... | We will not go forward with this code - while we might add the icons, this part here is way too specific and not at all abstracted for general application. I'd ask you to remove this - while we might broaden the scope at some time to allow for more precise icon theming, this will not be the way forward | // check if suffix based on first dot is in suffixes
// e.g. consider `module.js` as suffix to angular's module file named `auth.module.js`
while let Some((_, suffix)) = typ.split_once('.') {
let maybe_path = get_icon_from_suffix(suffix);
if maybe_path... | @@ -30,6 +30,40 @@ impl FileIcons {
// TODO: Associate a type with the languages and have the file's language
// override these associations
+ // Check if file is a Helm/Helmfile configuration by verifying:
+ // 1. File is in a templates/ subdirectory with Chart.yaml in parent di... | crates/file_icons/src/file_icons.rs | 26 | Rust | 0.643 | refactor | 303 | 51 | 51 | false | Add file icons for YAML, Helm and GitLab | 50,529 | zed-industries/zed | 59,345 | Rust | MrSubidubi | tzabbi |
.mt_neg_1()
.ml_2()
});
let filter_error_line = search
.panels_with_errors
.get(&InputPanel::Include)
.or_else(|| search.panels_with_errors.get(&InputPanel::Exclude))
.map(|error| {
Label::new(er... | No issues found. | .mt_neg_1()
.ml_2()
});
let filter_error_line = search
.panels_with_errors
.get(&InputPanel::Include)
.or_else(|| search.panels_with_errors.get(&InputPanel::Exclude))
.map(|error| {
Label::new(er... | @@ -869,15 +869,32 @@ impl ProjectSearchView {
// Subscribe to query_editor in order to reraise editor events for workspace item activation purposes
subscriptions.push(
cx.subscribe(&query_editor, |this, _, event: &EditorEvent, cx| {
- if let EditorEvent::Edited { .. } = ev... | crates/search/src/project_search.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | Add search_on_input setting to Project Search | 42,889 | zed-industries/zed | 59,345 | Rust | holoflash | |
Boundary::new(11, 5),
]
);
assert_eq!(
wrapper
.wrap_line(
&[LineFragment::text(" ")],
px(72.)
)
.collect::<Vec<_>>(),
&[
... | No issues found. | Boundary::new(11, 5),
]
);
assert_eq!(
wrapper
.wrap_line(
&[LineFragment::text(" ")],
px(72.)
)
.collect::<Vec<_>>(),
&[
... | @@ -1,4 +1,4 @@
-use crate::{FontId, FontRun, Pixels, PlatformTextSystem, SharedString, TextRun, px};
+use crate::{FontId, Pixels, SharedString, TextRun, TextSystem, px};
use collections::HashMap;
use std::{borrow::Cow, iter, sync::Arc};
@@ -13,7 +13,7 @@ pub enum TruncateFrom {
/// The GPUI line wrapper, used t... | crates/gpui/src/text_system/line_wrapper.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | editor: Fix soft wrap premature wrapping with certain fonts | 45,206 | zed-industries/zed | 59,345 | Rust | errmayank | |
use anyhow::Result;
use collections::HashMap;
use gpui::{App, Global, ReadGlobal, UpdateGlobal};
use parking_lot::RwLock;
use crate::{Snippet, SnippetKind, file_stem_to_key};
struct GlobalSnippetRegistry(Arc<SnippetRegistry>);
impl Global for GlobalSnippetRegistry {}
#[derive(Default)]
pub struct SnippetRegistry {
... | No issues found. | use anyhow::Result;
use collections::HashMap;
use gpui::{App, Global, ReadGlobal, UpdateGlobal};
use parking_lot::RwLock;
use crate::{Snippet, SnippetKind, file_stem_to_key};
struct GlobalSnippetRegistry(Arc<SnippetRegistry>);
impl Global for GlobalSnippetRegistry {}
#[derive(Default)]
pub struct SnippetRegistry {
... | @@ -42,7 +42,7 @@ impl SnippetRegistry {
let kind = file_path
.file_stem()
.and_then(|stem| stem.to_str().and_then(file_stem_to_key));
- let snippets = crate::file_to_snippets(snippets_in_file);
+ let snippets = crate::file_to_snippets(snippets_in_file, file_path);
... | crates/snippet_provider/src/registry.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | Improve snippet parse error context | 46,277 | zed-industries/zed | 59,345 | Rust | oscarvarto | |
match reveal {
RevealStrategy::Always => match reveal_target {
RevealTarget::Center => {
task_workspace.update_in(cx, |workspace, window, cx| {
let did_activate = workspace.activate_item(
... | No issues found. |
match reveal {
RevealStrategy::Always => match reveal_target {
RevealTarget::Center => {
task_workspace.update_in(cx, |workspace, window, cx| {
let did_activate = workspace.activate_item(
... | @@ -29,9 +29,9 @@ use util::{ResultExt, TryFutureExt};
use workspace::{
ActivateNextPane, ActivatePane, ActivatePaneDown, ActivatePaneLeft, ActivatePaneRight,
ActivatePaneUp, ActivatePreviousPane, DraggedSelection, DraggedTab, ItemId, MoveItemToPane,
- MoveItemToPaneInDirection, MovePaneDown, MovePaneLeft... | crates/terminal_view/src/terminal_panel.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | remote: Support local terminals in remote projects | 46,532 | zed-industries/zed | 59,345 | Rust | baldwindavid | |
},
cx,
);
cx.spawn(async move |_, _| {
let output = diagnostics_task.await?;
let content = output
.map(|output| output.text)
.unwrap_or_else(|| "No diagnostics found.".into());
Ok(Mention::Text {
... | No issues found. | },
cx,
);
cx.spawn(async move |_, _| {
let output = diagnostics_task.await?;
let content = output
.map(|output| output.text)
.unwrap_or_else(|| "No diagnostics found.".into());
Ok(Mention::Text {
... | @@ -234,6 +234,8 @@ impl MentionSet {
mention_uri.name().into(),
IconName::Image.path().into(),
mention_uri.tooltip_text(),
+ Some(mention_uri.clone()),
+ Some(workspace.downgrade()),
Some(image),
editor.c... | crates/agent_ui/src/mention_set.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | agent_ui: Make file mention chips clickable to open files | 46,751 | zed-industries/zed | 59,345 | Rust | soyllamas | |
cx.update(|cx| {
project.update(cx, |project, cx| {
project.find_or_create_worktree(path!("/external-src"), false, cx)
})
})
.detach();
cx.background_executor.run_until_parked();
let (multi_workspace, cx) =
cx.add_window_view(|window, cx| MultiWorkspace::test_new... | No issues found. | cx.update(|cx| {
project.update(cx, |project, cx| {
project.find_or_create_worktree(path!("/external-src"), false, cx)
})
})
.detach();
cx.background_executor.run_until_parked();
let (multi_workspace, cx) =
cx.add_window_view(|window, cx| MultiWorkspace::test_new... | @@ -1615,6 +1615,269 @@ async fn test_history_match_positions(cx: &mut gpui::TestAppContext) {
});
}
+#[gpui::test]
+async fn test_history_labels_do_not_include_worktree_root_name(cx: &mut gpui::TestAppContext) {
+ let app_state = init_test(cx);
+
+ cx.update(|cx| {
+ let settings = *ProjectPanelSe... | crates/file_finder/src/file_finder_tests.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | file_finder: Remove project's root name from the file finder history | 46,957 | zed-industries/zed | 59,345 | Rust | CCXLV | |
workspace.update(cx, |w, cx| {
w.open_path(file1.clone(), None, true, window, cx)
})
})
.unwrap()
.await
.unwrap();
cx.read(|cx| {
let pane = workspace.read(cx).active_pane().read(cx);
ass... | No issues found. | workspace.update(cx, |w, cx| {
w.open_path(file1.clone(), None, true, window, cx)
})
})
.unwrap()
.await
.unwrap();
cx.read(|cx| {
let pane = workspace.read(cx).active_pane().read(cx);
ass... | @@ -796,36 +796,33 @@ fn register_actions(
})
.register_action(|workspace, _: &workspace::Open, window, cx| {
telemetry::event!("Project Opened");
- let paths = workspace.prompt_for_open_path(
+ workspace::prompt_for_open_path_and_open(
+ workspace,
+ ... | crates/zed/src/zed.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | Fix `OpenFiles` action not respecting `use_system_path_prompts` setting | 47,027 | zed-industries/zed | 59,345 | Rust | austincummings | |
pub fn supports_thinking(&self) -> bool {
match self {
Self::MagistralMediumLatest | Self::MagistralSmallLatest => true,
Self::Custom {
supports_thinking, ..
} => supports_thinking.unwrap_or(false),
_ => false,
}
}
}
#[derive(Debug... | No issues found. | pub fn supports_thinking(&self) -> bool {
match self {
Self::MagistralMediumLatest | Self::MagistralSmallLatest => true,
Self::Custom {
supports_thinking, ..
} => supports_thinking.unwrap_or(false),
_ => false,
}
}
}
#[derive(Debug... | @@ -1,6 +1,6 @@
use anyhow::{Result, anyhow};
use futures::{AsyncBufReadExt, AsyncReadExt, StreamExt, io::BufReader, stream::BoxStream};
-use http_client::{AsyncBody, HttpClient, Method, Request as HttpRequest};
+use http_client::{AsyncBody, HttpClient, HttpRequestExt, Method, Request as HttpRequest};
use serde::{De... | crates/mistral/src/mistral.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | mistral: Add x-affinity header | 48,584 | zed-industries/zed | 59,345 | Rust | vianney | |
workspace: &mut Workspace,
callback: fn(&mut ProjectSearchBar, &A, &mut Window, &mut Context<ProjectSearchBar>),
) {
workspace.register_action(move |workspace, action: &A, window, cx| {
if workspace.has_active_modal(window, cx) && !workspace.hide_modal(window, cx) {
cx.propagate();
... | No issues found. | workspace: &mut Workspace,
callback: fn(&mut ProjectSearchBar, &A, &mut Window, &mut Context<ProjectSearchBar>),
) {
workspace.register_action(move |workspace, action: &A, window, cx| {
if workspace.has_active_modal(window, cx) && !workspace.hide_modal(window, cx) {
cx.propagate();
... | @@ -49,10 +49,7 @@ use workspace::{
DeploySearch, ItemNavHistory, NewSearch, ToolbarItemEvent, ToolbarItemLocation,
ToolbarItemView, Workspace, WorkspaceId,
item::{Item, ItemEvent, ItemHandle, SaveOptions},
- searchable::{
- CollapseDirection, Direction, SearchEvent, SearchToken, SearchableItem... | crates/search/src/project_search.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | search: Fix collapse/expand all button sync | 48,773 | zed-industries/zed | 59,345 | Rust | bnjjj | |
fn response_to_proto(
response: CoreCompletionResponse,
_: &mut LspStore,
_: PeerId,
buffer_version: &clock::Global,
_: &mut App,
) -> proto::GetCompletionsResponse {
proto::GetCompletionsResponse {
completions: response
.completions
... | No issues found. | fn response_to_proto(
response: CoreCompletionResponse,
_: &mut LspStore,
_: PeerId,
buffer_version: &clock::Global,
_: &mut App,
) -> proto::GetCompletionsResponse {
proto::GetCompletionsResponse {
completions: response
.completions
... | @@ -4799,17 +4799,10 @@ impl LspCommand for GetFoldingRanges {
);
let start = snapshot.anchor_after(start);
let end = snapshot.anchor_before(end);
- let collapsed_text =
- folding_range
- .collapsed_text
- ... | crates/project/src/lsp_command.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | lsp: Sanitize newlines in document and workspace symbol names | 49,092 | zed-industries/zed | 59,345 | Rust | aviatesk | |
}
cloud_llm_client::LanguageModelProvider::Google => {
let client = self.client.clone();
let llm_api_token = self.llm_api_token.clone();
let model_id = self.model.id.to_string();
let generate_content_request =
in... | No issues found. | }
cloud_llm_client::LanguageModelProvider::Google => {
let client = self.client.clone();
let llm_api_token = self.llm_api_token.clone();
let model_id = self.model.id.to_string();
let generate_content_request =
in... | @@ -6,12 +6,14 @@ use client::{Client, UserStore, zed_urls};
use cloud_api_types::Plan;
use cloud_llm_client::{
CLIENT_SUPPORTS_STATUS_MESSAGES_HEADER_NAME, CLIENT_SUPPORTS_X_AI_HEADER_NAME, CompletionBody,
- CompletionEvent, CountTokensBody, CountTokensResponse, ListModelsResponse,
- SERVER_SUPPORTS_STATU... | crates/language_models/src/provider/cloud.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | cloud_llm_client: Add StreamEnded and Unknown variants to CompletionRequestStatus | 49,121 | zed-industries/zed | 59,345 | Rust | tomhoule | |
fn show_remote_output(
&mut self,
action: RemoteAction,
info: RemoteCommandOutput,
cx: &mut Context<Self>,
) {
let Some(workspace) = self.workspace.upgrade() else {
return;
};
workspace.update(cx, |workspace, cx| {
let SuccessMess... | No issues found. |
fn show_remote_output(
&mut self,
action: RemoteAction,
info: RemoteCommandOutput,
cx: &mut Context<Self>,
) {
let Some(workspace) = self.workspace.upgrade() else {
return;
};
workspace.update(cx, |workspace, cx| {
let SuccessMess... | @@ -56,6 +56,7 @@ use project::{
project_settings::{GitPathStyle, ProjectSettings},
};
use prompt_store::{BuiltInPrompt, PromptId, PromptStore, RULES_FILE_NAMES};
+use proto::RpcError;
use serde::{Deserialize, Serialize};
use settings::{Settings, SettingsStore, StatusStyle};
use smallvec::SmallVec;
@@ -6420,7... | crates/git_ui/src/git_panel.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | devcontainer: Fix git output | 49,230 | zed-industries/zed | 59,345 | Rust | oliverbarnes | |
}
pub async fn create_llm_token(
&self,
system_id: Option<String>,
) -> Result<CreateLlmTokenResponse> {
let request_builder = Request::builder()
.method(Method::POST)
.uri(
self.http_client
.build_zed_cloud_url("/client/ll... | No issues found. | }
pub async fn create_llm_token(
&self,
system_id: Option<String>,
) -> Result<CreateLlmTokenResponse> {
let request_builder = Request::builder()
.method(Method::POST)
.uri(
self.http_client
.build_zed_cloud_url("/client/ll... | @@ -207,6 +207,34 @@ impl CloudApiClient {
Ok(())
}
+ pub async fn submit_agent_feedback_comments(
+ &self,
+ body: SubmitAgentThreadFeedbackCommentsBody,
+ ) -> Result<()> {
+ let request = self.build_request(
+ Request::builder().method(Method::POST).uri(
+ ... | crates/cloud_api_client/src/cloud_api_client.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | agent_ui: Route agent thread feedback comments through cloud | 49,481 | zed-industries/zed | 59,345 | Rust | tomhoule | |
if matched >= limit {
break;
}
}
}
/// Background workers cannot open buffers by themselves, hence main thread will do it on their behalf.
async fn open_buffers(
buffer_store: Entity<BufferStore>,
rx: Receiver<ProjectPath>,
find_all_ma... | No issues found. | if matched >= limit {
break;
}
}
}
/// Background workers cannot open buffers by themselves, hence main thread will do it on their behalf.
async fn open_buffers(
buffer_store: Entity<BufferStore>,
rx: Receiver<ProjectPath>,
find_all_ma... | @@ -728,22 +728,29 @@ impl RequestHandler<'_> {
}
async fn handle_find_first_match(&self, mut entry: MatchingEntry) {
- _=maybe!(async move {
+ async move {
let abs_path = entry.worktree_root.join(entry.path.path.as_std_path());
- let Some(file) = self.fs.context("Tryin... | crates/project/src/project_search.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | project: Block less in `Respository::paths_changed` | 49,584 | zed-industries/zed | 59,345 | Rust | Veykril | |
.header(PROTOCOL_VERSION_HEADER_NAME, PROTOCOL_VERSION.to_string()),
)
.await?;
Ok(Connection::new(ws))
}))
}
pub async fn create_llm_token(
&self,
system_id: Option<String>,
) -> Result<CreateLlmTokenResponse, Cli... | No issues found. | .header(PROTOCOL_VERSION_HEADER_NAME, PROTOCOL_VERSION.to_string()),
)
.await?;
Ok(Connection::new(ws))
}))
}
pub async fn create_llm_token(
&self,
system_id: Option<String>,
) -> Result<CreateLlmTokenResponse, Cli... | @@ -11,6 +11,7 @@ use gpui_tokio::Tokio;
use http_client::http::request;
use http_client::{AsyncBody, HttpClientWithUrl, HttpRequestExt, Method, Request, StatusCode};
use parking_lot::RwLock;
+use thiserror::Error;
use yawc::WebSocket;
use crate::websocket::Connection;
@@ -20,6 +21,14 @@ struct Credentials {
... | crates/cloud_api_client/src/cloud_api_client.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | Sign out upon receiving an Unauthorized response when acquiring an LLM token | 49,673 | zed-industries/zed | 59,345 | Rust | maxdeviant | |
})
}
AssistantMessageChunk::Thought { block } => {
block.markdown().and_then(|md| {
let this_is_blank = md.read(cx).source().trim().is_empty();
... | No issues found. | })
}
AssistantMessageChunk::Thought { block } => {
block.markdown().and_then(|md| {
let this_is_blank = md.read(cx).source().trim().is_empty();
... | @@ -1,6 +1,6 @@
use cloud_api_types::{SubmitAgentThreadFeedbackBody, SubmitAgentThreadFeedbackCommentsBody};
use gpui::{Corner, List};
-use language_model::LanguageModelEffortLevel;
+use language_model::{LanguageModelEffortLevel, Speed};
use settings::update_settings_file;
use ui::{ButtonLike, SplitButton, SplitBut... | crates/agent_ui/src/connection_view/thread_view.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | Add fast mode toggle in agent panel | 49,714 | zed-industries/zed | 59,345 | Rust | tomhoule | |
}),
metadata: None,
files: USER,
}),
SettingsPageItem::SettingItem(SettingItem {
title: "Bold Folder Labels",
description: "Whether to show folder names with bold text in the project panel.",
field: B... | No issues found. | }),
metadata: None,
files: USER,
}),
SettingsPageItem::SettingItem(SettingItem {
title: "Bold Folder Labels",
description: "Whether to show folder names with bold text in the project panel.",
field: B... | @@ -4256,7 +4256,7 @@ fn window_and_layout_page() -> SettingsPage {
}
fn panels_page() -> SettingsPage {
- fn project_panel_section() -> [SettingsPageItem; 21] {
+ fn project_panel_section() -> [SettingsPageItem; 22] {
[
SettingsPageItem::SectionHeader("Project Panel"),
Sett... | crates/settings_ui/src/page_data.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | project_panel: Add diagnostic count badges and color priority | 49,802 | zed-industries/zed | 59,345 | Rust | davidescaccia | |
})
}
fn apply_stash(workspace: &mut Workspace, window: &mut Window, cx: &mut App) {
Self::stash_action(
workspace,
"Apply",
window,
cx,
async move |repository, sha, stash, commit_view, workspace, cx| {
let result = ... | No issues found. | })
}
fn apply_stash(workspace: &mut Workspace, window: &mut Window, cx: &mut App) {
Self::stash_action(
workspace,
"Apply",
window,
cx,
async move |repository, sha, stash, commit_view, workspace, cx| {
let result = ... | @@ -3,6 +3,7 @@ use buffer_diff::BufferDiff;
use collections::HashMap;
use editor::display_map::{BlockPlacement, BlockProperties, BlockStyle};
use editor::{Addon, Editor, EditorEvent, ExcerptRange, MultiBuffer, multibuffer_context_lines};
+use feature_flags::{FeatureFlagAppExt as _, GitGraphFeatureFlag};
use git::r... | crates/git_ui/src/commit_view.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | git_ui: Improve connection between the graph and commit views | 50,027 | zed-industries/zed | 59,345 | Rust | danilo-leal | |
workspace.update_in(cx, |workspace, window, cx| {
let workspace_handle = cx.weak_entity();
let context_server_store = workspace.project().read(cx).context_server_store();
workspace.toggle_modal(window, cx, |window, cx| Self {
context_server... | No issues found. | workspace.update_in(cx, |workspace, window, cx| {
let workspace_handle = cx.weak_entity();
let context_server_store = workspace.project().read(cx).context_server_store();
workspace.toggle_modal(window, cx, |window, cx| Self {
context_server... | @@ -877,9 +877,14 @@ fn wait_for_context_server(
context_server_id: ContextServerId,
cx: &mut App,
) -> Task<Result<(), Arc<str>>> {
+ use std::time::Duration;
+
+ const WAIT_TIMEOUT: Duration = Duration::from_secs(120);
+
let (tx, rx) = futures::channel::oneshot::channel();
let tx = Arc::new... | crates/agent_ui/src/agent_configuration/configure_context_server_modal.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | Fix "add custom context server" modal hanging indefinitely | 50,085 | zed-industries/zed | 59,345 | Rust | tomhoule | |
cx.run_until_parked();
let update = events_rx
.try_recv()
.expect("conflicts should appear once conflicted paths are visible");
assert_eq!(update.old_range, 0..0);
assert_eq!(update.new_range, 0..1);
conflict_set.update(cx, |conflict_set, cx| {
... | No issues found. |
cx.run_until_parked();
let update = events_rx
.try_recv()
.expect("conflicts should appear once conflicted paths are visible");
assert_eq!(update.old_range, 0..0);
assert_eq!(update.new_range, 0..1);
conflict_set.update(cx, |conflict_set, cx| {
... | @@ -336,7 +336,7 @@ mod conflict_set_tests {
second_head: UnmergedStatusCode::Updated,
},
);
- // Cause the repository to emit MergeHeadsChanged.
+ // Cause the repository to update cached conflicts
state.refs.insert("MERGE_HEAD".into... | crates/project/tests/integration/git_store.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | git: Fix conflicted paths not getting cleared | 50,327 | zed-industries/zed | 59,345 | Rust | cole-miller | |
"prettier.config.mjs",
"prettierignore",
"prettierrc",
"prettierrc.cjs",
"prettierrc.js",
"prettierrc.json",
"prettierrc.json5",
"prettierrc.mjs",
"prettierrc.toml",
"prettierrc.yaml",
"pr... | No issues found. | "prettier.config.mjs",
"prettierignore",
"prettierrc",
"prettierrc.cjs",
"prettierrc.js",
"prettierrc.json",
"prettierrc.json5",
"prettierrc.mjs",
"prettierrc.toml",
"prettierrc.yaml",
"pr... | @@ -66,7 +66,7 @@ pub struct IconDefinition {
}
const FILE_STEMS_BY_ICON_KEY: &[(&str, &[&str])] = &[
- ("docker", &["Dockerfile"]),
+ ("docker", &["Containerfile", "Dockerfile"]),
("ruby", &["Podfile"]),
("heroku", &["Procfile"]),
];
@@ -99,6 +99,15 @@ const FILE_SUFFIXES_BY_ICON_KEY: &[(&str, &[&... | crates/theme/src/icon_theme.rs | 0 | Rust | 1 | none | 16 | 51 | 51 | true | Add file icons for YAML, Helm and GitLab | 50,529 | zed-industries/zed | 59,345 | Rust | tzabbi | |
if v.Cursor.HasSelection() {
searchStart = ToCharPos(v.Cursor.CurSelection[1], v.Buf)
} else {
searchStart = ToCharPos(v.Cursor.Loc, v.Buf)
}
BeginSearch()
if usePlugin {
return PostActionCall("Find", v)
}
return true
}
// FindNext searches forwards for the last used search term
func (v *View) FindNext(... | This is the point, should I remove this `if` ?
|
searchStr := ""
if v.Cursor.HasSelection() {
searchStart = ToCharPos(v.Cursor.CurSelection[1], v.Buf)
searchStart = ToCharPos(v.Cursor.CurSelection[1], v.Buf)
searchStr = v.Cursor.GetSelection()
} else {
searchStart = ToCharPos(v.Cursor.Loc, v.Buf)
}
BeginSearch(searchStr)
if usePlugin {
return PostAc... | @@ -796,9 +799,15 @@ func (v *View) FindNext(usePlugin bool) bool {
if v.Cursor.HasSelection() {
searchStart = ToCharPos(v.Cursor.CurSelection[1], v.Buf)
+ if lastSearch == "" { // or always? FIXME | cmd/micro/actions.go | 26 | Go | 0.286 | refactor | 47 | 51 | 51 | false | Improve Search behaviour, and Escape key behaviour | 409 | zyedidia/micro | 13,805 | Go | ilius | ilius |
"CtrlP": tcell.KeyCtrlP,
"CtrlQ": tcell.KeyCtrlQ,
"CtrlR": tcell.KeyCtrlR,
"CtrlS": tcell.KeyCtrlS,
"CtrlT": tcell.KeyCtrlT,
"CtrlU": tcell.KeyCtrlU,
"CtrlV": tcell.KeyCtrlV,
"CtrlW": tcell.KeyCtrlW,
"CtrlX": tcell.KeyCtrlX,
"Ctr... | turns out, mate-terminal sends CtrlBackspace as tcell.KeyBackspace, and there wasn't another way to bind to that behavior, since everything explicitly referenced tcell.KeyBackspace2. | "CtrlN": tcell.KeyCtrlN,
"CtrlO": tcell.KeyCtrlO,
"CtrlP": tcell.KeyCtrlP,
"CtrlQ": tcell.KeyCtrlQ,
"CtrlR": tcell.KeyCtrlR,
"CtrlS": tcell.KeyCtrlS,
"CtrlT": tcell.KeyCtrlT,
"CtrlU": tcell.KeyCtrlU,
"CtrlV": tcell.KeyCtrlV,
"Ctr... | @@ -255,6 +255,7 @@ var bindingKeys = map[string]tcell.Key{
"Escape": tcell.KeyEscape,
"Enter": tcell.KeyEnter,
"Backspace": tcell.KeyBackspace2,
+ "OldBackspace": tcell.KeyBackspace, | cmd/micro/bindings.go | 26 | Go | 0.357 | suggestion | 182 | 51 | 51 | false | a few miscellaneous fixes and improvements | 1,105 | zyedidia/micro | 13,805 | Go | jtolio | jtolio |
package buffer
import (
"bytes"
"crypto/md5"
"errors"
"io"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
"unicode/utf8"
luar "layeh.com/gopher-luar"
"github.com/zyedidia/micro/internal/config"
ulua "github.com/zyedidia/micro/internal/lua"
"github.com/zyedidia/micro/internal/scree... | What is the point of the `updateDiffTimer`? This will call the given function in a separate goroutine after 500ms. Wouldn't it be better to simply call the function in a separate goroutine right away? Something like
```go
go func() {
b.updateDiffSync()
callback(false)
}()
```
and then get rid of `upd... | }
}
// UpdateDiff computes the diff between the diff base and the buffer content.
// The update may be performed synchronously or asynchronously.
// UpdateDiff calls the supplied callback when the update is complete.
// The argument passed to the callback is set to true if and only if
// the update was performed sync... | @@ -930,6 +946,101 @@ func (b *Buffer) Write(bytes []byte) (n int, err error) {
return len(bytes), nil
}
+func (b *Buffer) updateDiffSync() {
+ b.diffLock.Lock()
+ defer b.diffLock.Unlock()
+
+ b.diff = make(map[int]DiffStatus)
+
+ if b.diffBase == nil {
+ return
+ }
+
+ differ := dmp.New()
+ baseRunes, bufferRun... | internal/buffer/buffer.go | 26 | Go | 0.857 | question | 343 | 942 | 51 | false | Diff gutter | 1,487 | zyedidia/micro | 13,805 | Go | zyedidia | p-e-w |
func RegisterGlobalOption(name string, defaultvalue interface{}) error {
if v, ok := GlobalSettings[name]; !ok {
defaultGlobalSettings[name] = defaultvalue
GlobalSettings[name] = defaultvalue
err := WriteSettings(filepath.Join(ConfigDir, "settings.json"))
if err != nil {
return errors.New("Error writing set... | I think this should be `false` by default. I'm open to hearing other opinions though. | func RegisterGlobalOption(name string, defaultvalue interface{}) error {
if v, ok := GlobalSettings[name]; !ok {
defaultGlobalSettings[name] = defaultvalue
GlobalSettings[name] = defaultvalue
err := WriteSettings(filepath.Join(ConfigDir, "settings.json"))
if err != nil {
return errors.New("Error writing set... | @@ -176,6 +176,7 @@ var defaultCommonSettings = map[string]interface{}{
"basename": false,
"colorcolumn": float64(0),
"cursorline": true,
+ "diffgutter": true, | internal/config/settings.go | 26 | Go | 0.429 | suggestion | 85 | 51 | 51 | false | Diff gutter | 1,487 | zyedidia/micro | 13,805 | Go | zyedidia | p-e-w |
} else {
h.Buf.Path = filename
h.Buf.SetName(filename)
InfoBar.Message("Saved " + filename)
if callback != nil {
callback()
}
}
return true
}
// Find opens a prompt and searches forward for the input
func (h *BufPane) Find() bool {
return h.find(true)
}
// FindLiteral is the same as Find() but does n... | Why has this function been removed? | } else {
h.Buf.Path = filename
h.Buf.SetName(filename)
InfoBar.Message("Saved " + filename)
if callback != nil {
callback()
}
}
return true
}
// Find opens a prompt and searches forward for the input
func (h *BufPane) Find() bool {
return h.find(true)
}
// FindLiteral is the same as Find() but does n... | @@ -856,30 +856,6 @@ func (h *BufPane) FindLiteral() bool {
return h.find(false)
}
-// Search searches for a given string/regex in the buffer and selects the next
-// match if a match is found
-// This function affects lastSearch and lastSearchRegex (saved searches) for
-// use with FindNext and FindPrevious
-func... | internal/action/actions.go | 26 | Go | 0.143 | question | 35 | 51 | 51 | false | find: prefill with selection | 2,115 | zyedidia/micro | 13,805 | Go | zyedidia | alikefia |
if c.X == util.CharacterCount(c.buf.LineBytes(c.Y)) {
c.Right()
return
}
c.Right()
}
return
}
if (util.IsWordDelimiter(c.RuneUnder(c.X))) {
for util.IsWordDelimiter(c.RuneUnder(c.X)) {
if c.X == util.CharacterCount(c.buf.LineBytes(c.Y)) {
c.Right()
return
}
c.Right()
}
if (... | So if it is on a whitespace, it jumps to the beginning of the nearest word, not to the next subword of this word? Looks inconsistent with the behavior of `WordRight` and `WordLeft`. | c.Left()
}
c.Right()
return
}
c.Left()
for util.IsWordChar(c.RuneUnder(c.X)) {
if c.X == 0 {
return
}
c.Left()
}
c.Right()
}
// SubWordRight moves the cursor one sub-word to the right
func (c *Cursor) SubWordRight() {
if util.IsWhitespace(c.RuneUnder(c.X)) {
for util.IsWhitespace(c.RuneUnder(... | @@ -431,6 +431,127 @@ func (c *Cursor) WordLeft() {
c.Right()
}
+// SubWordRight moves the cursor one sub-word to the right
+func (c *Cursor) SubWordRight() {
+ if (util.IsWhitespace(c.RuneUnder(c.X))) {
+ for util.IsWhitespace(c.RuneUnder(c.X)) {
+ if c.X == util.CharacterCount(c.buf.LineBytes(c.Y)) {
+ c.R... | internal/buffer/cursor.go | 26 | Go | 0.5 | nitpick | 181 | 51 | 51 | false | Implemented sub-word cursor movement | 2,665 | zyedidia/micro | 13,805 | Go | dmaluka | masmu |
c.Left()
}
c.Left()
for util.IsWordChar(c.RuneUnder(c.X)) {
if c.X == 0 {
return
}
c.Left()
}
c.Right()
}
// SubWordRight moves the cursor one sub-word to the right
func (c *Cursor) SubWordRight() {
if (util.IsWhitespace(c.RuneUnder(c.X))) {
for util.IsWhitespace(c.RuneUnder(c.X)) {
if c.X == uti... | So if it is on a non-word non-whitespace character, it jumps to the nearest word or whitespace? Again, looks inconsistent with `WordRight` and `WordLeft`. But actually this seems like a reasonable behavior. But it would be reasonable for `WordRight` and `WordLeft` as well. So I'd suggest to fix `WordRight` and `WordLef... | return
}
c.Right()
for util.IsWordChar(c.RuneUnder(c.X)) {
if c.X == util.CharacterCount(c.buf.LineBytes(c.Y)) {
return
}
c.Right()
}
}
// WordLeft moves the cursor one word to the left
func (c *Cursor) WordLeft() {
c.Left()
for util.IsWhitespace(c.RuneUnder(c.X)) {
if c.X == 0 {
return
}
c.L... | @@ -431,6 +431,127 @@ func (c *Cursor) WordLeft() {
c.Right()
}
+// SubWordRight moves the cursor one sub-word to the right
+func (c *Cursor) SubWordRight() {
+ if (util.IsWhitespace(c.RuneUnder(c.X))) {
+ for util.IsWhitespace(c.RuneUnder(c.X)) {
+ if c.X == util.CharacterCount(c.buf.LineBytes(c.Y)) {
+ c.R... | internal/buffer/cursor.go | 26 | Go | 0.571 | suggestion | 444 | 51 | 51 | false | Implemented sub-word cursor movement | 2,665 | zyedidia/micro | 13,805 | Go | dmaluka | masmu |
// WordLeft moves the cursor one word to the left
func (h *BufPane) WordLeft() bool {
h.Cursor.Deselect(true)
h.Cursor.WordLeft()
h.Relocate()
return true
}
// SelectUp selects up one line
func (h *BufPane) SelectUp() bool {
if !h.Cursor.HasSelection() {
h.Cursor.OrigSelection[0] = h.Cursor.Loc
}
h.MoveCurso... | nit: Move `SubWordRight()` and `SubWordLeft()` after `WordRight()` and `WordLeft()`? | }
} else {
h.Cursor.Right()
}
}
h.Relocate()
return true
}
// WordRight moves the cursor one word to the right
func (h *BufPane) WordRight() bool {
h.Cursor.Deselect(false)
h.Cursor.WordRight()
h.Relocate()
return true
}
// WordLeft moves the cursor one word to the left
func (h *BufPane) WordLeft() ... | @@ -234,6 +234,22 @@ func (h *BufPane) CursorRight() bool {
return true
}
+// SubWordRight moves the cursor one sub-word to the right
+func (h *BufPane) SubWordRight() bool {
+ h.Cursor.Deselect(false)
+ h.Cursor.SubWordRight()
+ h.Relocate()
+ return true
+}
+
+// SubWordLeft moves the cursor one sub-word to the ... | internal/action/actions.go | 26 | Go | 0.429 | question | 84 | 51 | 51 | false | Implemented sub-word cursor movement | 2,665 | zyedidia/micro | 13,805 | Go | dmaluka | masmu |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.